dshbase

插件目录 / Developer / dsh-monaco

dsh-monaco

已验证 · 实测可装 DevViking-Persike

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-22最近推送
跨平台平台

功能简介

DeepSeek Harness plugin: serves the Monaco editor distribution over a host HTTP route, so an editor plugin needs no CDN

✅
我们的评价
可用 — 实测通过,早期项目

DeepSeek Harness plugin: serves the Monaco editor distribution over a host HTTP route, so an editor plugin needs no CDN 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

dsh-monaco

Serves the Monaco Editor distribution to the browser over a host HTTP route, for DeepSeek Harness plugins that need a real code editor in the page.

Why a route instead of a bundle

The harness browser plugin channel delivers exactly one file per plugin (/plugins/<id>/client.js), and the dynamic bundler emits no extra chunks or assets. Monaco is a multi-file distribution — a loader, per-language modules, and a stylesheet — so it cannot arrive that way.

This plugin mounts those files under a route of its own, reading them from the installed monaco-editor package. The editor therefore stays local: no CDN at runtime, and no third-party origin inside a tool that reads the operator's source tree.

Install

dsh plugin --profile web add github:DevViking-Persike/dsh-monaco

Restart dsh. The distribution is then available under /monaco.

Use it from a client plugin

Monaco publishes itself through its own AMD loader:

await loadScript('/monaco/loader.js')
window.require.config({ paths: { vs: '/monaco' } })
window.require(['vs/editor/editor.main'], () => {
  window.monaco.editor.create(host, { value: '', language: 'typescript' })
})

Configuration

Field Default Meaning
route /monaco Absolute URL prefix, no trailing slash.
- id: dsh-monaco
  name: 'dsh-monaco'
  config:
    route: /vendor/monaco

Model Experience

None. This plugin serves static bytes to the browser and registers no tool, prompt section, or session event, so nothing it does reaches a model request or consumes context.

Safety

  • Every request path is resolved against the distribution root and then proved to be inside it. resolve collapses .. first, so an escape is caught by the containment test rather than by pattern-matching request text — including percent-encoded attempts, which reach the server intact.
  • A read failure under the root answers 404, the same as an unknown path, so the browser cannot learn which files exist from a distinguishable error.
  • Only GET and HEAD are served; anything else answers 405.
  • An extension absent from the content-type table is served as application/octet-stream rather than guessed, so a wrong type never makes the browser execute something as script.

Known Limitations and Deferred Work

  • The route serves the whole distribution, including language modules a given page never loads. Serving a subset would need to know each consumer's languages up front, which the route cannot see.
  • Responses carry a one-week immutable cache-control. That is safe because the distribution is version-pinned by the installed package, but a Monaco upgrade needs a cache-busting route change or a hard reload to take effect in an open tab.
  • Files are read per request with no in-process cache; the OS page cache absorbs this, and holding a 24 MB distribution in heap to avoid it has no current consumer.
  • Monaco's web workers are not configured here. A consumer that wants them must serve its own worker entry and set MonacoEnvironment; without one Monaco runs its language services on the main thread.

License

MIT — see LICENSE. NOTICE.md carries attribution for Monaco Editor (© Microsoft, MIT) and the DeepSeek Harness project whose plugin conventions this follows.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-monaco」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:DevViking-Persike/dsh-monaco

Headless(CLI)profile:

dsh plugin --profile headless add github:DevViking-Persike/dsh-monaco

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →