Skip to main content

dshcode/packages/bundle/web-app

90Stars8Forks0Issues1Watchers

DSH Browser-Side One-Click Launch Bundle: Sets up Web host, API gateway, browser plugin registry, model prompts, and auto browser launch.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki

ⓘ This plugin is a sub-package of the whitelonng/dshcode monorepo — stars and activity count the whole repository.

Language
TypeScript
License
MIT
Branch
master
agentdeepseekdeepseekharness-plugindsh-pluginharness

Install

cmdweb profile
$ dsh plugin --profile web add @deepseek-ai/dsh-web-app

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin whitelonng/dshcode/packages/bundle/web-app for me: review the repository at https://github.com/whitelonng/dshcode first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

An out-of-the-box bundle for DSH browser-side, featuring Web service, API gateway, browser plugin registry, model context prompts, and default browser launch capability all in one package. A single dsh --profile web command in the terminal pulls up the complete web-based DSH.

Core Features

  • One-click browser-side DSH startup: When starting with dsh --profile web, mounts all Web host entries (HTTP service, API gateway, Session projection cache, local storage) and displays the access address
  • Auto-open default browser: After the service port is ready, calls the system default browser to open http://127.0.0.1:3080, no manual link copying needed
  • Model context prompts: Registers app:web-surface prompt segment, telling the model the user is using the local Web interface and update conventions
  • Bash variable exposure: Exposes DSH_WEB_URL environment variable in the managed Shell environment for script access to current Web entry
  • Trusted host whitelist: Pass --trusted-host multiple times to add allowed hosts or domains to the browser's API trust fence
  • Community plugin hosting: Treats optional community products like GenUI, Annotation, Web-UI as browser plugins, with deployment toggles manageable in Settings

Technical Implementation

  • Language: TypeScript (ESM)
  • Key dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-host-webserver, @deepseek-ai/dsh-host-frontend-static, @deepseek-ai/dsh-app-boot, commander, open
  • Architecture pattern: Cordis function plugin + Bundle Patch: src/index.ts exports function plugin format with name / inject / Config / apply; cordis.patch.yml is a patch list layered on top of dsh-base, declaring host entries to insert or override one by one
  • Entry files: src/index.ts (runtime glue plugin), src/startup.ts (CLI argument parsing), cordis.patch.yml (host assembly manifest)

Use Cases

Regular users who just installed DSH and want to chat with the model in the browser just need to run dsh --profile web. If you want to access the local Web interface from a LAN phone or other terminal, add the remote host to the whitelist via --trusted-host. If you only want pure CLI interaction, you can choose the dsh-headless bundle; this package is not CLI-friendly and must be used with the Web side.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSHNot declaredThis bundle does not declare DSH version requirements in its own package.json
Node>= 22.19.0Root package.json declares `^22.19.0
PlatformCross-platformWorks on macOS / Windows / Linux; default browser launch is handled uniformly by the open library, with extra wait for PowerShell child process exit code on Windows
Native modulesNoneDoes not depend on any napi / native compiled modules; runtime only uses Node built-in modules and pure JS dependencies

Installation

dsh plugin --profile web add github:whitelonng/dshcode/packages/bundle/web-app

Configuration Options

ConfigTypeDescriptionDefault
openBrowserbooleanWhether to auto-open default browser after service is ready; automatically disabled when starting remotely via SSHtrue
printUrlbooleanWhether to print access line like dsh web: http://... in terminal (including LAN address)true
surfaceContextbooleanWhether to register app:web-surface prompt segment and DSH_WEB_URL environment variable; can be disabled in non-interactive layerstrue
trustedHostsstring[]Trusted host list passed via --trusted-host, concatenated to the API trust fence[]
--hoststringBind address; explicitly rejects 0.0.0.0 (for security reasons)Falls back to 127.0.0.1 when not specified
--portnumberListening port; 0 lets the system assign a free portFalls back to 3080 when not specified
--no-openbooleanDisable auto-open browser behavior after startup--open

FAQ

Q: Console shows frontend dist not built at startup, how to handle?

A: This bundle only serves pre-built frontend dist to the browser. You need to run pnpm run build in the repository root first to generate the frontend artifacts, then start dsh --profile web. There is no fallback logic to serve directly from source code.

Q: I want my LAN phone to access dsh web, how to configure?

A: Default binds to 127.0.0.1:3080, external cannot connect directly. This package deliberately does not support --host 0.0.0.0. You need to use a reverse proxy or tunnel, then add the peer host to the API trust whitelist via --trusted-host http://your-proxy.local.

Q: What do I need to do after installing to dsh to enable it?

A: This bundle is a Web profile layer plugin. Please start dsh with dsh --profile web after installation; the headless profile with the same name will not mount it and will fall back to CLI interaction.

Q: Is there a switch to disable auto-opening browser on every startup?

A: Yes. Simply add --no-open at startup; the plugin also automatically skips this step during remote SSH login to avoid popping up a local browser on the server.

Q: How to uninstall or disable this bundle?

A: This bundle belongs to the Web profile layer. Removing the entire dsh --profile web startup method disables it; to replace with another Web surface implementation, override the web-runtime line in your own profile patch without modifying this package's code.

Q: Why doesn't the browser auto-refresh after I modify frontend code?

A: The client plugin HMR channel is idle by default. Hot reload only takes effect when running pnpm run dev:web simultaneously to watch for client bundle rebuilds; changes to apps/web shell or other regular packages require rebuilding artifacts and manually refreshing the page.

Difficulty Level

Beginner — works with a single command; all tunable parameters have reasonable defaults; ordinary users can complete startup without reading source code. You only need to glance at startup parameters when you need to customize the hosting host or binding port.

Known Issues & Limitations

  • Frontend dist must be built first: The bundle locates pre-built artifacts via require.resolve; unbuilt state refuses to start with an error, suggesting pnpm run build
  • LAN address sampled only at startup: After network card changes, it won't rebroadcast; the printed LAN URL and trust fence remain consistent
  • Community plugin switches require restart: Settings page only persists desired state, not hot-swapping mounted external plugins; restart dsh after switching for changes to take effect
  • Web shared HMR not yet enabled: The hmr line in cordis.patch.yml is set to disabled, with source comments marking it to be re-enabled after reload lifecycle testing is complete (cordis.patch.yml:21)
  • Does not support binding to all network interfaces: --host 0.0.0.0 is actively rejected at CLI parsing stage; CLI has not yet implemented safe all-interface exposure
  • Temporary tools calling mode switch: The tools line in cordis.patch.yml reads environment variable DSH_TOOLS_MODE (native / code / both); this environment variable entry will be removed after Web UI provides per-session selection

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/whitelonng/dshcode/packages/bundle/web-app)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory