Skip to content

feat(dsh): restore lightweight DSH plugin on unified bsk CLI runtime - #761

Merged
NianJiuZst merged 2 commits into
Tencent:mainfrom
NianJiuZst:feat/lightweight-dsh-plugin
Nov 17, 2026
Merged

NianJiuZst merged 2 commits into
Tencent:mainfrom
NianJiuZst:feat/lightweight-dsh-plugin

Conversation

@NianJiuZst

Copy link
Copy Markdown
Collaborator

Why

  • Retiring @wxg-prc-cpg/browser-skill-dsh-plugin in Retire legacy DSH plugin package and enforce unified zero-skip real-browser CI gates #731 eliminated ~22k LOC of duplicated session lifecycle, cooperation plumbing, and React Web UI inspection overlays, but also removed BrowserSkill's native distribution entry in the DeepSeek Harness (dsh-plugin) ecosystem and left existing npm consumers pinned to a frozen 0.5.0 package.
  • DeepSeek Harness already provides shell execution and ImplicitScopeRegistry already isolates concurrent conversations and subagents automatically via DSH_SESSION_ID. Reintroducing a thin Cordis package preserves DSH plugin marketplace discoverability and seamless dsh plugin add / dsh plugin update workflows while sharing 100% of the standard bsk CLI + daemon + Agent Window architecture with all other harnesses.

What

  • Lightweight Cordis plugin (packages/dsh-plugin-browserskill, ~350 LOC):
    • Preserves @wxg-prc-cpg/browser-skill-dsh-plugin, dsh-plugin keywords, and cordis.patch.yml with only @deepseek-ai/cordis and @deepseek-ai/schemastery peer dependencies (zero @deepseek-ai/dsh-* host rc version locks and zero Web UI client bundle).
    • Syncs the canonical crates/bsk-cli/skill bundle, install.sh, install.ps1, AGENT_INSTALL.md, and LICENSE at build/prepack time — eliminating the second forked DSH skill definition.
  • PATH self-healing & on-demand guided setup:
    • Automatically appends ~/.local/bin ($BSK_INSTALL_DIR) to the DSH host PATH (and prepends any configured bskPath directory, unwinding on plugin dispose) so GUI/profile launches immediately resolve bsk.
    • When bsk is not yet installed on the host, prepends a concise first-time setup section to the registered skill pointing to the bundled cross-platform bin/install-bsk.mjs (bsk-dsh-install) launcher and local AGENT_INSTALL.md (running bsk doctor and guiding Chrome/Edge extension connection). Subsequent conversations automatically drop the setup header once bsk is installed.
  • CI, release automation & docs:
    • Restores .github/workflows/release-dsh-plugin.yml, dsh tag/version coordination in scripts/release.mjs, and out-of-tree npm pack tarball verification in scripts/check-dsh-package.mjs.
    • Adds end-to-end integration tests against real @deepseek-ai/cordis Context and @deepseek-ai/dsh-skill SkillRegistry, wires them into .github/workflows/ci.yml, and updates README.md, README.zh-CN.md, AGENT_INSTALL.md, CHANGELOG.md, and CHANGELOG.zh-CN.md.

Verification

  • pnpm --filter @wxg-prc-cpg/browser-skill-dsh-plugin typecheck
  • pnpm dsh:test
  • node scripts/check-dsh-package.mjs
  • node --test scripts/release.test.mjs scripts/check-skill-bundles.test.mjs
  • node scripts/check-skill-bundles.mjs
  • python3 scripts/check-changelog-sync.py
  • pnpm lint

Why:
- Retiring `@wxg-prc-cpg/browser-skill-dsh-plugin` in Tencent#731 eliminated ~22k LOC
  of duplicated session lifecycle, cooperation plumbing, and React inspection
  overlays, but also dropped BrowserSkill's native distribution entry in the
  DeepSeek Harness (`dsh-plugin`) ecosystem and left existing npm consumers on
  a frozen 0.5.0 package.
- DeepSeek Harness already provides shell execution and `ImplicitScopeRegistry`
  already isolates concurrent conversations via `DSH_SESSION_ID`, so the DSH
  plugin only needs to publish the canonical CLI skill, heal GUI/profile `PATH`
  lookup, and guide first-run `bsk` installation without reintroducing parallel
  `bsk_*` tool wrappers or fragile `@deepseek-ai/dsh-client-ui-*` `rc` locks.

What:
- Restore `packages/dsh-plugin-browserskill` (`@wxg-prc-cpg/browser-skill-dsh-plugin`)
  as a ~350-LOC Cordis plugin depending only on `@deepseek-ai/cordis` and
  `@deepseek-ai/schemastery` (zero `@deepseek-ai/dsh-*` host `rc` peer locks
  and zero Web UI client bundle).
- Sync the canonical `crates/bsk-cli/skill` bundle, `install.sh`, `install.ps1`,
  `AGENT_INSTALL.md`, and `LICENSE` at build/prepack time so DSH shares the
  exact single-source-of-truth CLI skill and Agent Window workflow with all
  other harnesses.
- Automatically append `~/.local/bin` (`$BSK_INSTALL_DIR`) to the DSH host
  `PATH` (and prepend any explicit `bskPath` directory, unwinding on dispose);
  when `bsk` is missing on the host, prepend an on-demand setup header pointing
  to the bundled cross-platform `bin/install-bsk.mjs` launcher and local
  `AGENT_INSTALL.md`, dropping the setup header automatically on subsequent
  conversations once `bsk` is installed.
- Add end-to-end integration tests against real Cordis `Context` and
  `@deepseek-ai/dsh-skill` `SkillRegistry`, restore out-of-tree tarball
  verification (`scripts/check-dsh-package.mjs`), `dsh-plugin-v*` release
  automation (`.github/workflows/release-dsh-plugin.yml`, `scripts/release.mjs`),
  CI checks, and bilingual documentation/changelogs.
… cold 2x full-page captures

Why:
- After Wave 5A (Tencent#754) moved `content.js` to lazy runtime injection, cold 2x DPR
  SwiftShader full-page captures (`agent.browser.test.ts` `scale = 2` on 2-vCPU
  Linux CI runners) can overlap initial Tier-A ShadowRoot CSS/React mount and
  `CAPTURE_SUPPRESS` two-frame compositing with `runBrowserMutation` frame
  collection, intermittently exceeding the 1200ms per-frame IPC deadline with
  `FrameUnresponsiveError` (`effect_state: "none"`).
- `guardedRunner.runBrowserMutation` also invoked `beginDomMutation()` followed
  immediately by `prepare()`, issuing two redundant back-to-back full-tab
  `collectCooperationFrames` sweeps per call, while `handleFullPageScreenshot`
  wrapped passive read-only `inspect` probes in `runBrowserMutation`.

What:
- Call `prepare(undefined, "Browser.mutate")` directly in `runBrowserMutation`
  (`action-guard.ts`), preserving full decision/expectation and pending-gesture
  verification in a single frame sweep before `dispatch(true, "Browser.mutate")`.
- Skip `runBrowserMutation` on passive `inspect` probes in
  `handleFullPageScreenshot` (`screenshot-full-page.ts`).
- Raise `FRAME_REPLY_TIMEOUT_MS` (`browser-bridge.ts`) and `OWNER_REPLY_MS`
  (`hidden-frames.ts`) from `1200ms` to `3000ms`.
@NianJiuZst
NianJiuZst merged commit c730a55 into Tencent:main Nov 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant