Preface¶
Common approaches for enabling agents to manipulate web pages in DSH involve stuffing the entire page DOM, accessibility tree, or large chunks of HTML into the context. As pages become more complex, token overhead and noise increase, and models often get lost in irrelevant nodes. The MCP stdio version of openjev-browser has already used a local decision model to condense “which element to click” into a single structured result; dsh-openjev-browser is its native DSH (cordis) plugin port, with tool names and parameter schemas consistent with the Python MCP server. When migrating, simply remove the mcp__openjev-browser__ prefix. Maintained by belowthetree, categorized under Model Inference, with a current GitHub star count of 0.
What is this¶
In short: dsh-openjev-browser is a DSH plugin that implements model-driven browser manipulation with minimal context overhead. The local OpenJev-4B decision model reads the page and returns only the single element required to complete the natural language goal; the agent never touches the DOM throughout the process. The browser side is based on playwright-core. Plugin version 0.1.0, MIT License.
Core Features¶
The plugin registers a set of browser tools with DSH for the following purposes:
| Tool | Purpose |
|---|---|
browser_open |
Open URL (auto / chrome / msedge / chromium, can reuse existing browser profiles) |
browser_pick |
Let OpenJev determine which element can complete the natural language goal |
browser_click |
Click by goal or CSS selector |
browser_type |
Type text into an element selected by goal or selector |
browser_text |
Read bounded text snippets from the page or a single element |
browser_scroll |
Scroll the page or scroll an element into view |
browser_screenshot |
Return page screenshot (optional bounding box highlight for target element) |
browser_status |
Report model/service detection status and deployment instructions |
browser_close |
Close the browser session |
When no model is available, goal-driven tools (browser_pick, and the goal path of click/type/text/scroll/screenshot) will soft-fail and return structured deployment instructions; pure CSS selector calls do not depend on the model and are always available.
When the current model routing accepts image input (checked via llm.resolveModelInfo), browser_screenshot will return the image inline; otherwise, it degrades to metadata text with [image unavailable: ...] attached, or you can use the path parameter to save the file to disk.
The client registers an “OpenJev Browser” settings section, supported by an API /dsh-openjev-browser/api listening only on loopback addresses; values saved in the panel are written to $DSH_HOME/dsh-openjev-browser.settings.json and take effect immediately without needing to restart DSH.
Installation and Activation¶
The following describes the steps to build from source and register with DSH. The materials do not provide a one-click installation command like dsh plugin add github:...; please refer to the README.
- After cloning or obtaining the plugin source code, install dependencies and build in the plugin directory (if scripts are restricted in the sandbox, add
--ignore-scripts):
pnpm install # Available in sandbox: pnpm install --ignore-scripts
pnpm build # tsc(host side) + esbuild(client) -> lib/
- Register the build output directory with DSH by adding the following to
cordis.patch.yml:
- insert:
- id: dsh-openjev-browser
name: dsh-openjev-browser
Optional configuration items (example values are defaults) can be written in the config under the same insert, for example:
- insert:
- id: dsh-openjev-browser
name: dsh-openjev-browser
config:
openjevUrl: http://127.0.0.1:8080
modelDir: null
pythonPath: null
autoStartServer: true
serverPort: 8080
serverStartupTimeoutMs: 240000
browser: auto
headed: false
userDataDir: null
maxCandidates: 80
includeOffscreen: true
maxNameLength: 90
viewport: [1280, 900]
timeoutMs: 30000
debugDir: null
Configuration priority is: built-in defaults < loader patch config < settings file; deleting the settings file falls back to the patch config.
Model Deployment¶
The plugin does not bundle model weights or a Python runtime; you must deploy them yourself. The “Deployment Instructions” card in the settings panel contains a copyable agent prompt: paste it into any DSH session, and the agent can complete the Python environment setup, model download, and smoke self-check, reporting back the two paths to fill in. For detailed specifications, see docs/DEPLOYMENT.md in the repository.
Once deployed, the plugin detects in the following order:
- Whether a decision service already exists at
openjevUrl(defaulthttp://127.0.0.1:8080); - Local artifacts (
config.modelDir,$OPENJEV_ARTIFACT,$OPENJEV_MODEL,~/.openjev/models/OpenJev-4B,~/.dsh/openjev/models/OpenJev-4B), validated againstmanifest.jsonandCOMPLETE; - A Python interpreter with the
openjevpackage installed (order:config.pythonPath→$OPENJEV_PYTHON→pythonon PATH). When conditions 2+3 are met, it can automatically startpython -m openjev.runtime.serveron first use.
The agent-assisted deployment flow documented in the materials is roughly: create a Python 3.12 environment outside the DSH session workspace (default %USERPROFILE%\.dsh\openjev\runtime); use uv pip install to install torch and openjev[serve] @ git+https://github.com/ejhshen/OpenJev.git (the openjev package name is taken on PyPI, so you must use git); download the Hugging Face repository shenjunhao/OpenJev-4B (approx. 8 GB) and verify artifacts; smoke test python -m openjev.runtime.server --artifact <dir> until /health is ready; fill in the Python path and model directory in the settings panel.
You can probe via CLI afterwards:
node lib/setup.js detect # Probe service / artifacts / python
node lib/setup.js print-config # Output cordis.patch.yml config snippet
Under the Windows sandbox, the plugin redirects TMP/TEMP/TMPDIR/TORCHINDUCTOR_CACHE_DIR for Python subprocesses to $DSH_HOME/openjev/tmp to prevent torch inductor from reporting temporary directory unavailability; if pythonPath points to an interpreter inside the workspace that is not writable, it falls back to .openjev-tmp/ next to the interpreter.
Typical Usage¶
In a DSH session, the agent simply calls via the tool names above; semantics are identical to the MCP version. A common workflow might be:
browser_opento open the target URL;- Call
browser_pickorbrowser_click/browser_typewith agoalusing a natural language objective; - Use
browser_textwhen needing to confirm page text, andbrowser_screenshotwhen visual evidence is needed; - Call
browser_statusfirst if unsure whether the environment is ready; browser_closewhen finished.
If migrating from MCP, simply change the original mcp__openjev-browser__browser_* to browser_* and keep the parameters unchanged.
For development-side smoke tests (mock context, register tools and open about:blank):
pnpm typecheck
node scripts/smoke.mjs
Use Cases and Notes¶
Suitable for developers who need to perform web automation within DSH while wanting to control context size and leave “element selection” to local OpenJev rather than the full page DOM. Pure selector-driven clicking and typing do not depend on the model, suitable for scripted steps with known stable DOMs; natural language goals depend on a deployed OpenJev service or local artifacts and a Python environment.
Please read the GitHub source code and MIT license yourself before installing. DSH plugins run with the permissions of the current dsh process; the browser can be configured with userDataDir to reuse login states, so risks must be assessed when involving accounts and privacy pages. When starting the decision service for the first time, serverStartupTimeoutMs defaults to 240000 ms, as materials mention the first Triton JIT may take several minutes. The community directory site has no official affiliation with DeepSeek / Higher Future; this plugin is a community-maintained cordis plugin.
Links¶
- Community Directory Page: https://www.skillhub.cn/plugins/belowthetree/dsh-openjev-browser
- GitHub: https://github.com/belowthetree/dsh-openjev-browser
Through the steps above, you can perform model-driven browsing in DSH using a tool surface aligned with MCP, and keep page understanding local to OpenJev rather than pushing the DOM to the conversation model.