dsh-host-frontend-static/packages/host/frontend-static官方

175.3kStar19.0kFork0Issue752Watching

为 Web shell 提供 SPA 静态文件服务的函数插件,占用 webserver 单一 fallback 插槽,以 SPA 路由方式托管构建后的前端资源

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-host-frontend-static

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

English | 中文

SPA dist server for the Web shell: a function plugin (config {distIndex}) that claims the webserver's single fallback seat and serves the built frontend directory with the shell's locked semantics — traversal outside the dist root is 403, any miss falls back to index.html with HTTP 200 (SPA routing), unknown extensions ship as application/octet-stream, and non-GET/HEAD without a matching named route is 405. Every index response runs through the webserver's registered index taps (applyIndexTaps), which is how the boot manifest reaches the page. distIndex is an assembly fact of the composing application: dsh-web-app resolves it through the frontend package's exports and mounts this plugin; a deployment never hardcodes it.

The fallback seat is single-owner (a second claim throws) and effect-scoped: disposing the plugin's fiber releases the seat, after which the unclaimed webserver answers 404.

Model Experience

None, as the package serves browser assets; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • The starter MIME table is minimal — it covers the Vite-emitted asset set plus the shipped PWA manifest; other extensions fall back to application/octet-stream until an asset class actually ships.
dsh-host-frontend-static/packages/host/frontend-static — DeepSeek Harness 插件 | deepseek-plugin.org