dsh-web
zhu1090093659
DeepSeek Harness (DSH) Web 插件聚合生态 · 万物皆插件,通过创意工坊分发||DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:lucagiftzek/dsh-artifacts
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
An Artifacts tab for the DSH (DeepSeek Harness) web GUI sidebar.
Agents produce files — an HTML report, a dashboard, a diagram, a CSV. This tab lists them newest-first inside the sidebar and previews one in place, so a human watching a session can see what it produced without copying paths into a browser by hand.
It is a peer of the sidebar's own tabs (explorer, editor, terminal, browser), not an overlay: it registers through the same public extension point they use.
dsh-artifacts:library, via ctx.betterSidebar.registerTab.Open ↗ opens it in a real browser tab, Copy link copies the shareable
absolute URL, Reload re-fetches the preview, Refresh re-reads the index.visible prop the sidebar provides for exactly that.If your server injects a live-reload snippet into served HTML (see
docs/artifact-index-endpoint.md for a reference implementation), previews
refresh themselves when a file is regenerated. This plugin does not implement
that and does not need to know about it.
dsh-better-sidebar mounted (entry id better-sidebar).
If the registry is missing, the client half logs an error and registers
nothing — it never throws, so a missing dependency degrades to "no tab"
rather than a broken sidebar.docs/artifact-index-endpoint.md. DSH does
not define an artifact directory or an index route itself, so this is the one
piece you wire up. A standalone reference server and a publisher script are in
contrib/.# from GitHub
dsh plugin --profile web add github:lucagiftzek/dsh-artifacts
# or from a checkout
git clone https://github.com/lucagiftzek/dsh-artifacts
dsh plugin --profile web add link:./dsh-artifacts
dsh plugin is a pnpm passthrough, so add also appends the package to
dsh.profile.bundles. Removing is dsh plugin --profile web remove dsh-artifacts.
Activation needs a dsh-web restart, which mints a new launch token and
kills any session in flight. Rebuilds of lib/client.js afterwards are picked
up live — the served rev changes and a browser refresh is enough.
The default index URL is /report/?list=1. Override it per browser without a
rebuild:
localStorage['dsh-artifacts:indexUrl'] = '/artifacts/index.json'
The endpoint must return:
{ "count": 2, "items": [
{ "name": "report.html", "url": "/report/report.html", "ext": "html",
"size": 11160, "mtime": 1788934528 }
] }
url may be relative or absolute. Anything else the plugin can render without
(badge, a missing size) degrades quietly. Full contract, plus how to keep it
metadata-only and fenced to one directory, is in
docs/artifact-index-endpoint.md.
One directory usually holds every session's output, so the tab can narrow the
list. When the sidebar supplies a session id the request gains
&session=<id>; an endpoint that can attribute artifacts answers with a boolean
mine per item, and the tab shows a This chat / All toggle, defaulting to
This chat when it has something.
Attribution is deliberately the endpoint's business, not the plugin's — only the
host knows what a session is. Ignoring the parameter is fully supported: omit
mine and the toggle simply does not render, which is what the reference server
in contrib/ does. The one mistake to avoid is emitting mine: false for
artifacts you know nothing about; the tab reads a boolean as "attribution ran"
and would offer a permanently empty This chat view. Say nothing unless it is
true. docs/artifact-index-endpoint.md describes a transcript-scanning rule that
works, including why to cache it and validate the id.
lib/index.js imports nothing and registers nothing. That is deliberate, and
both reasons are failures worth designing against:
dsh.client
declaration from packages mounted in the host Loader. No mount, no served
bundle.@deepseek-ai/dsh-settings that the installed version does not export. The
ESM import became a hard SyntaxError at load, the loader entry threw, and
dsh exited 1 before boot finished — hundreds of restarts and the site fully
down. A zero-import host half cannot fail that way.inject hangs boot. inject: [] on the host half avoids
the "1 entry did not activate" failure that an inject nothing provides
causes.All data reaches the browser over HTTP, so the plugin needs no host service, no filesystem access and no settings namespace.
pnpm install # esbuild is a devDependency
node scripts/build.mjs # writes lib/client.js (+ map)
Set ESBUILD_MAIN=/path/to/esbuild/lib/main.js to build against a bundler that
lives elsewhere, which keeps the build offline.
The client bundle is CJS wrapped in the web boot factory
(window.__ModuleLoader__.load({ id, factory })). react and
react/jsx-runtime stay external and resolve to the shell's own instances — the
served URL is the combo form /plugins/??dsh-artifacts/client.js&rev=…, not
a plain per-plugin path. Two gates run after the build:
@deepseek-ai/ may reach the bundle; a value import would
inline a duplicate runtime instance of a shell package.require must be a declared external, or the
module system throws loudly at materialization.node test/run.mjs # offline: no browser, no DSH_HOME, no network
test/render.mjs materializes the bundle the way the browser module system
does, drives registerTab, and structurally renders six states — empty library,
populated with a selection, hidden tab, fetch error, vanished selection, and
toolbar geometry under busy. It seeds the real react/jsx-runtime so
elements are genuine, with a programmable stub for react so hooks need no
dispatcher.
test/fetch.mjs captures load() from the poll interval and drives every fetch
outcome, including the auth-redirect case where a proxy answers HTML instead of
JSON.
Both suites have already earned their keep. The render suite caught a vanished
selection being synced in an effect, which painted one frame with an iframe
pointing at a path that had just 404'd — it is derived during render now. It
later caught a toolbar that changed width on every poll because a button label
swapped with busy.
skills/publish-artifact/SKILL.md is a
drop-in skill teaching an agent the convention this tab reads: where to write
artifacts, how to name them, and what never to put in one. Copy it into
$DSH_HOME/skills/, ~/.agents/skills/, or a project's .dsh/skills/.
MIT — see LICENSE. Copyright (c) 2026 Loukas "Luca" Tzekos.
Do whatever you want with it. The only ask is attribution: keep the copyright line, and if you fork it publicly, a "based on dsh-artifacts by Luca Tzekos" note in your README is appreciated. See NOTICE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: sidebar。