HakureiMonika/dsh-browser-scope

dsh-browser-scope

Agent-native browser DevTools workbench for DeepSeek Harness. / 让你的DSH获得非常强大的 Chromium DevTools 能力

Uncategorizedbroswer-scopedeepseek-harnessdeepseek-harness-plugin

DSH BrowserScope

Full Chromium DevTools Workbench for DSH Agents

More than just viewing pages. Click, step through breakpoints, inspect network requests, resolve Source Maps, and capture undeniable diagnostics evidence.

Quick Install · Visual Tour · 30 Tools · Validation · Technical Specs

The current language is English | 简体中文


[!IMPORTANT] This is an independent community plugin. It is not published, maintained, or endorsed by DeepSeek, and it does not modify DeepSeek Harness core packages.
This plugin is still under development; if you encounter any bugs or unexpected issues, please report them to the developer via the issue tracker.

If it's useful, please stars let more people can see it~ Thanks♪(・ω・)ノ

Overview

What is the biggest pain point in frontend debugging? Invisible DOM trees, missed request details, inability to step through code, and error messages reduced to a single cryptic line. When autonomous agents encounter complex web issues, it's even worse — they are often stuck taking superficial screenshots, guessing causes, and repeating futile "refresh and retry" loops.

BrowserScope fundamentally changes this dynamic. It embeds a comprehensive Chromium workbench into the right sidebar of DSH Web, powered by 30 purpose-built automation tools. Agents can now directly inspect DOM nodes, interact with elements, review console logs, trace network requests, set breakpoints, read execution call stacks, resolve Source Maps, profile runtime performance, and preserve intact diagnostic evidence before and after interactions. From elementary clicks and scrolls to deep breakpoint inspection and bottleneck diagnosis, everything is handled natively within a single Session.

Furthermore, BrowserScope ensures safe multi-plugin coexistence across DSH 0.1.5-rc.2, 0.1.6-alpha.1, 0.1.6-alpha.2, and 0.1.7-rc.1. Each formal Session selects its browser toolset upon first use (BrowserScope or existing third-party browser tools in the current profile). Once chosen, that Session remains permanently locked to that toolset, while other Sessions can choose independently. This prevents contaminated cross-plugin states, detached tabs, and conflicted authentication sessions.

BrowserScope Live Workbench inside DSH Web

Table of Contents

Validation Results

All tests are conducted under real Chromium, genuine DSH Web environments, and realistic production code bases, avoiding artificial mocks or simplified toy fixtures.

Core Capabilities

  • 30 Browser Tools fully passed in real Chromium environments.
  • 9 Native Workbench Views verified in live DSH Web workflows.
  • Multi-Plugin Coexistence verified through session-scoped selection, locking, runtime release, independent choice, and restart persistence on DSH 0.1.5-rc.2.
  • 4 DSH Versions tested across compatibility matrix.
  • Sustained Stress Testing (30 min × 3 tiers) with stable performance and leak-free memory profiles.

Verification Matrix

Test TrackScopeResult
Complete Toolchain RegressionAll 30 tools covered end-to-endPASS
DSH Web Native Workbench9 views + Multi-Session + Multi-PanePASS
Multi-Plugin CoexistenceSession first-choice, lock, release, isolation, restart recoveryRC2 Live PASS
Complex Web Fault ScenariosAsync race conditions + Multi-page navigation + Production bundlesPASS
Multi-Version Compatibility4 DSH release milestonesPASS
Long-Running StressSustained high-frequency operations × 30 minSTABLE

For complete test protocols, raw metrics, and layered breakdown, please see VALIDATION.en.md.

Feature Highlights

Unified Single-Window Diagnostic Loop

Agent conversations, target web pages, tab bars, address inputs, and DevTools inspections reside synchronously in the DSH right sidebar. When anomalies occur, there is no need to alternate between disparate application windows — inspect DOM hierarchies, console logs, network events, and script call stacks in place.

Real Scenario: An unexpected layout glitch occurs. The Agent invokes browser_snapshot to inspect DOM styles, discovering a container whose display was asynchronously toggled to none. It then leverages browser_debugger to place a breakpoint in the offending script, traces the original position via Source Maps, and resolves the async state race condition without manual intervention.

First-Choice Locking: Stable Session Tooling

First Browser Selection in a Session

Before the first browser interaction in a formal Session, the user or model selects either BrowserScope or pre-existing third-party browser tools. Prior to selection, browser tools remain concealed from the Agent to prevent premature invocation.

Session Locked to BrowserScope

Selecting BrowserScope locks the Session exclusively to BrowserScope. Selecting third-party tools ensures BrowserScope refrains from registering tools or allocating runtime resources in that Session. Tooling cannot be swapped mid-session; switching plugins simply requires creating a new Session. Other Sessions choose independently without disturbing third-party plugin processes or configs.

Arbitrated Tools List

Releasing BrowserScope resources safely dismantles its internal pages and debugger connections while preserving the Session's tooling lock. Tool selections automatically persist across DSH restarts and Agent Scope replacements.

Minified Production Code? Restored Instantly

CDP Debugger, Real Call Stack, and Source Map Resolution

Bundle compressed into a single minified line? Connect the CDP Debugger, resolve Source Maps, and navigate the original source tree directly. Call stacks, variable scopes, and breakpoint targets are mapped back to authoring coordinates.

Real Scenario: A production runtime throws Uncaught TypeError: Cannot read property 'data' of undefined at minified coordinate bundle.min.js:1:47392. The Agent pauses execution via browser_debugger, extracts the Source Map, maps the fault directly to src/api/fetchUser.ts:23:15, and pinpoint missing async exception guards.

Transparent Network Timings & Interception

Network Journal Timeline

Network journals are ordered chronologically, with incremental markers clearly illustrating asynchronous request lifecycles. Ideal for catching stale cache overrides, out-of-order responses, and network race conditions.

Dual-Page Split View Monitoring

BrowserScope Dual-Page Split View

Inspect two real pages simultaneously with independent screencasts and isolated focus targets. Arrange top-to-bottom for responsive checks or side-by-side for comparative page flows.

Immutable Incident Forensics

Debug Session, Context Topology, and Action Timeline

Debug sessions encapsulate page identities, action sequences, context topology, and build identifiers into a unified diagnostic bundle.

Checkpoints, Comparisons, and Incident Summary

Take checkpoints before and after interactions; compare states to generate verifiable incident reports.

Performance & Memory Auditing

Performance Profiler View

Investigate CPU spikes, main-thread blocking, and memory leaks. Export traces, capture CPU profiles, and record Heap Snapshots directly to session-isolated artifact storage without exhausting LLM context limits.

Installation

Requires Node.js ^22.19.0 or >=24.0.0, and a functional DSH Web Profile.

1.0.0-rc7 targets DSH 0.1.7-rc.1 and 0.1.7-rc.2 using the same browser business source as the validated RC6. Before installing, verify that the exact version has been published on the npm Registry; otherwise use a local tarball checked against its candidate identity file and SHA-256. Freezing and public release are separate steps and cannot be inferred from the package version alone.

dsh plugin --profile web add dsh-browser-scope@1.0.0-rc7 --ignore-scripts --config.auto-install-peers=false

Or install via local tarball:

dsh plugin --profile web add ./dsh-browser-scope-1.0.0-rc7.tgz --ignore-scripts --config.auto-install-peers=false

Enable in your profile's cordis.patch.yml:

- insert:
    - id: browser-tools
      name: dsh-browser-scope

Launch DSH Web, create a new Session, and send an initial message. Open the "Browser" menu adjacent to the input prompt, select "Use DSH BrowserScope" or "Use other browser tools", and the selection will lock for that Session.

When upgrading from the legacy dsh-browser-tools package, remove the previous package first. Keep id: browser-tools and the $DSH_HOME/browser-tools data directory intact. Avoid co-installing both packages in the same profile.

Tool Reference

Browsing & Interaction

FeatureDescriptionTool
Tab ManagementList, create, switch, and close browser tabsbrowser_tabs
Page NavigationOpen URLs, go back, forward, and reloadbrowser_navigate, browser_navigate_back
Content InspectionRead DOM hierarchy, element coordinates, attributes, and query matchesbrowser_snapshot, browser_get_attribute, browser_query
User OperationsClick, hover, scroll, type, keypresses, select options, wait conditionsbrowser_click, browser_hover, browser_scroll, browser_type, browser_press_key, browser_select_option, browser_wait_for
Dialog HandlingAccept/dismiss alerts, prompts, and dialogsbrowser_handle_dialog
Script ExecutionEvaluate JavaScript in page or element contextbrowser_evaluate
Screenshot CaptureCapture viewport or full-page visual capturesbrowser_take_screenshot
File HandlingUpload local files and intercept downloaded artifactsbrowser_upload_file, browser_download

Console & Network

FeatureDescriptionTool
Console LogsRead logs, warnings, errors, and count deduplicated entriesbrowser_console_messages
Request InspectionExamine URL, method, HTTP status, resource type, and sequencebrowser_network_requests
Body InspectionRead raw request and response payloadsbrowser_network_requests
Interception ControlPause in-flight requests or responsesbrowser_network_control
Routing ActionsContinue, abort, or fulfill paused trafficbrowser_network_control
Mock ResponsesReturn synthetic status codes, headers, and response bodiesbrowser_network_control
Request ReplayResend captured network transactionsbrowser_network_control
Watchdog Fail-SafeAutomatic timeout continuation to avoid stalled pagesbrowser_network_control

Breakpoints & Sources

FeatureDescriptionTool
CDP DebuggerAttach/detach CDP debugging session to the current pagebrowser_debugger
Stepping ControlSet breakpoints, pause, resume, step over, step into, step outbrowser_debugger
Call Stack AnalysisInspect call frames, source coordinates, and pause reasonsbrowser_debugger
Scope VariablesInspect local, closure, and global scopesbrowser_debugger
Source ResolutionMap minified coordinates back to original files/linesbrowser_debugger, browser_diagnose
Build IdentificationCorrelate script content with build hashesbrowser_diagnose

Performance & Diagnostics

FeatureDescriptionTool
Timeline TracesCapture main-thread activity, rendering, and network eventsbrowser_profile
CPU ProfilingIdentify computational hotspots and function invocation pathsbrowser_profile
Coverage AnalysisMeasure JS and CSS code coverage percentagesbrowser_profile
Memory SnapshotsExport Heap Snapshots to isolate retainers and leaksbrowser_profile
Diagnostic SessionBundle pages, actions, context topology, and build identitiesbrowser_diagnose
CheckpointsSnapshot page states before and after actionsbrowser_diagnose
Diff ComparisonCompare checkpoints to highlight regressionsbrowser_diagnose
Incident ExportSummarize actions, console events, and comparisons into unified reportsbrowser_diagnose

Live View & Manual Takeover

FeatureDescriptionTool
Live ScreencastContinuous low-latency visual stream in the right sidebarbrowser_live_view
Responsive AdaptationAuto-scale viewport to match panel dimensionsbrowser_live_view, browser_emulate
Dual-Page ViewsTop/bottom or left/right split monitoringbrowser_split_view
Manual InteractionDirect mouse clicks, movement, and wheel scrollingbrowser_takeover
Native KeyboardHardware keys, modifiers, and native IME compositionbrowser_takeover
Clipboard PasteSynthetic PasteEvents without reading clipboard historybrowser_takeover
Control HandoffPause agent interactions during takeover, restore on handoffbrowser_takeover

Extensions & Environment

FeatureDescriptionTool
Extension InstallerInstall via Chrome Web Store URLs or extension IDsbrowser_extensions
Unpack SecurityEnforce path validation, size ceilings, and zip extraction safetybrowser_extensions
Extension LifecycleInstall, enable, disable, uninstall, and apply Manifest V3 extensionsbrowser_extensions
Popup SupportOpen and interact with authentic chrome-extension:// popupsbrowser_extensions
EmulationOverride viewports, device profiles, locales, timezones, and networksbrowser_emulate
Proxy RoutingSupport system, direct, or custom HTTP/HTTPS/SOCKS proxiesPlugin Config

Session Arbitration

FeatureDescription
Initial SelectionChoose BrowserScope or existing third-party browser tools upon first use
Permanent LockSession remains strictly locked to chosen toolset; swap by opening a new Session
Pre-Select ConcealmentConceals browser tools from agent until user explicitly selects a provider
Shadowing & RestrictionsShadows colliding tools and hides incompatible third-party tools in active Session
Safe DeferralOther browser tools retain full visibility if chosen; BrowserScope steps aside
Resource DisposalReleasing BrowserScope frees pages/debugger without unlocking the Session
Restart RecoverySelections persist across DSH restarts and Agent Scope reconstructions
Isolated StatePages, views, tabs, popups, debuggers, and screencasts remain isolated per Session
Shared Web ContextCookies, LocalStorage, IndexedDB, Cache, and Service Workers share across Sessions

Technical Specs

For complete schema definitions, controller state machines, security invariants, and RPC contracts, see TECHNICAL.en.md.

Validation Report

For comprehensive multi-environment empirical test results, see VALIDATION.en.md.

Compatibility

The target DSH range for 1.0.0-rc7 is 0.1.5-rc.2, 0.1.6-alpha.1, 0.1.6-alpha.2, 0.1.7-rc.1, and 0.1.7-rc.2, with Cordis >=4.0.2 <5 and Schemastery >=3.18.2 <4. RC7 retains RC6's browser business code; check the Registry for the exact npm version before using the install command, and verify candidate freezing and GitHub publication separately.

Candidate identity is anchored by external candidate-identity.json and tarball digest.

Feedback & Issues

For bugs, compatibility issues, or feature requests, please submit an issue on GitHub Issues. Include your DSH version, BrowserScope version, OS, Node.js version, and any co-installed browser plugins.

Security vulnerabilities should be reported privately according to our Security Policy. Never submit credentials, cookies, or raw session logs in public channels.

License

MIT