Skip to content

fix(dsh)!: namespace BrowserSkill tools and recover failed activation - #446

Merged
iuyo5678 merged 4 commits into
mainfrom
fix/dsh-tool-namespace
Oct 14, 2026
Merged

iuyo5678 merged 4 commits into
mainfrom
fix/dsh-tool-namespace

Conversation

@iuyo5678

@iuyo5678 iuyo5678 commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #444. Related to #445.

BrowserSkill's generic browser_session name collides with dsh-builtin-browser, preventing its browser workflow from becoming available. Move the complete six-tool API to fixed bsk_* names, with one name contract shared by host schemas, the screenshot view, and skill validation. Actions, arguments, results, session ownership, and the plugin-global registration lifetime remain unchanged.

Build all definitions before registering. If any registration fails, release this attempt's entries in reverse order, preserve the original error, and keep lazy activation eligible for a later lifecycle retry. Install resource cleanup before eager registration.

Activate user /browser-skill gestures synchronously at agent/inbox/claimed, before the host assembles the tool snapshot, so the first model request contains both the skill instructions and all six schemas. Match only user-authored gesture text and deduplicate the claim, official injection, and durable append. Native model skill calls activate through tools/post-execute for the following step.

Track activation intent separately from successful delivery of the skill body. A blocked native skill result already reports the failure; agent/pre-step reports changed failures or recovery once to the affected conversation. Recovery asks the model to reload the skill when the failed call never delivered its instructions. Unrelated conversations continue normally. Declare the runtime @deepseek-ai/dsh-llm peer as required.

Breaking API migration

The six browser_* names become bsk_session, bsk_page, bsk_inspect, bsk_interact, bsk_tabs, and bsk_assist. There are no executable aliases. Copied profile instructions, installation guidance, structured extraction examples and diagnostics, and packaged video integration callers use the new public names. Restart DSH, invoke /browser-skill again in existing conversations, and update hardcoded calls, tool policies, and toolOrder. Historical calls and attachments are preserved; old screenshot cards may use the generic renderer. The plugin README and changelog document this as a breaking change for the next coordinated release.

Validation

  • Plugin TypeScript check, host/client build, Biome checks, six skill validation tests, and the packed npm artifact check passed.
  • 530 plugin tests passed on Node 22, including real DSH registry/execution integration, all six rollback positions, cleanup, retry, cancellation, scoped diagnostics, reload, structured extraction through bsk_inspect, and screenshot toolview coverage.
  • The suite includes 12 tests using the published DSH 0.1.5-rc.3 Agent Loop, prompt assembler, tool runtime, and official skill plugin. They capture actual model requests and cover first-step schemas, gesture matching, one registration attempt, same-turn recovery, first-load failure recovery, changed failures, and notice deduplication. Seven of these tests fail with the pre-fix implementation. Only the model and browser subprocess boundaries are fixtures.
  • Built host bundle with locally installed DSH 0.2.0-rc.2: seven Agent Loop scenarios passed with a deterministic local model, including first-step schemas and all reported notification failures. These scenarios make no network or browser calls.
  • Extension TypeScript check and build passed; all 20 profile-instruction tests passed, covering all 10 locales.
  • Browser video regression passed in isolated Chrome for Testing 149: capture, navigation, recovery, post-session DSH export, playback and seeking (2 tests; the opt-in stress benchmark was skipped).
  • DSH 0.1.5-rc.3 and 0.2.0-rc.2: 13 isolated runtime scenarios each, using the published dsh-builtin-browser@0.4.7 tool layer. Both plugin load orders, lazy/eager activation, collisions, recovery, unload/reload, and official slash-skill injection passed. Browser providers and subprocesses were fixtures for these scenarios.
  • Local DSH 0.2.0-rc.2, bsk 0.3.2, and connected Chrome/extension: native skill → bsk_session(start) → bsk_page(navigate) → bsk_inspect(observe/screenshot) → bsk_session(stop) passed against a local test page. The competing plugin's registration and the user's existing session remained intact.

Runtime and browser smoke tests ran on macOS; Windows desktop UI was not exercised.

Use a shared bsk_* tool contract to coexist with other browser plugins.
Roll back incomplete registrations, retain lazy activation intent, and
surface failures through native DSH hooks with scoped diagnostics.

BREAKING CHANGE: the six browser_* tool names are replaced by bsk_* names.
Reload the skill and update tool policies and hardcoded callers after upgrade.
Register claimed user gestures before the first tool snapshot and synchronize activation failures with session recovery notices. Track skill delivery separately from activation intent, require the runtime LLM peer, and cover the real Agent Loop request boundary.
Preserve structured extraction under bsk_inspect, including its action routing, parameter schema, regression tests, documentation, and session diagnostics.
@iuyo5678
iuyo5678 merged commit 94e2d44 into main Oct 14, 2026
19 of 21 checks passed
ArcueidMP added a commit to ArcueidMP/BrowserSkill that referenced this pull request Oct 14, 2026
The focus mapping cases from Tencent#447 still looked up browser_session after Tencent#446 renamed the tool, so they failed on main as well.
ArcueidMP added a commit to ArcueidMP/BrowserSkill that referenced this pull request Oct 14, 2026
The focus mapping cases from Tencent#447 still looked up browser_session after Tencent#446 renamed the tool, so they failed on main as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants