Huuuuung/dsh-artifact-index0

dsh-artifact-index

Artifact index endpoint for the DeepSeek Harness web GUI: serves the JSON index contract and the file bytes that the dsh-artifacts sidebar tab reads.

包名
dsh-artifact-index
版本
0.1.0
许可证
MIT
最近更新
2026年9月11日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Huuuuung/dsh-artifact-index

配置

配置写在 profile 的 cordis.patch.yml 里那条 mount row 的 config 下, 或者用环境变量。优先级:config > 环境变量 > 默认值

- id: dsh-artifact-index
  name: 'dsh-artifact-index'
  config:
    root: 
    maxItems: 500
    maxFileBytes: 26214400
    csp: sandbox
默认值说明
root$DSH_HOME/artifacts要索引的目录。不递归,只扫这一层。
maxItems500返回条目数上限,超出部分丢弃并在日志里记一条警告。
maxFileBytes26214400(25 MB)单文件上限,超过返回 413
cspsandbox给 HTML/SVG/XML 响应加的 Content-Security-Policy。见下。
trustedHosts[]额外允许的 Host。仅当 DSH 不跑在 loopback 上时才需要。

$DSH_HOME 指 DSH 的数据目录(Windows 下可用 echo $env:DSH_HOME 查看, 或从 dsh --profile desktop --dump-config 里找)。

环境变量:DSH_ARTIFACT_INDEX_ROOT 覆盖 root(当 config 未提供时)。

csp 三个取值:

实际下发的头适用
sandbox(默认)sandboxartifact 内的脚本、表单、弹窗、同源访问全部失效。
sandbox-scriptssandbox allow-scripts需要看 JS 渲染的 HTML artifact(如自绘图表)。
none不下发只在明确理解风险时使用。