nuwa-skill
alchaincyf
你想蒸馏的下一个员工,何必是同事。蒸馏任何人的思维方式——心智模型、决策启发式、表达DNA。Distill how anyone thinks.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Townrain/dsh-model-vendor-badge
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
A vendor logo seat for the DeepSeek Harness web composer: it shows which provider serves the current model, right next to the model selector, live off the official per-session ModelDirectory.
[🐳 DeepSeek] [deepseek-v4-pro · High ▾] [Send]
conversation.input.right — the composer tool
row seat immediately left of the model selector.ModelDirectory the model seat renders from
(ctx.modelDirectories), so a selection change anywhere — the seat menu,
the /model popup, the host — updates the badge live.currentColor path so the theme owns the tone, exactly like the other
controls in that row.deepseek, deepseek-official,
deepseek-account, deepseek-reasoner) paints the same whale — one vendor,
different transports.The icons are not hand-written into the source. They are a declarative registry plus a generator:
| File | Role |
|---|---|
icons/sources.json |
route -> icon source, display label, fallback color. The only file to edit when adding a vendor. |
icons/cache/opencode-sprite.json |
opencode's official provider sprite, minus the generic sparkle placeholders upstream ships for vendors it has no mark for |
icons/cache/simple-icons.json |
Simple Icons (CC0) supplements: Anthropic, Google Gemini, Qwen, Ollama, GitHub Copilot, Hugging Face, Kimi, and more |
icons/local/deepseek-whale.svg |
the DeepSeek whale, maintained here |
src/client/official-icons.generated.ts |
generated output — do not edit |
After editing icons/sources.json:
node scripts/generate-icons.mjs # regenerate
node verify-icons.mjs # coverage + placeholders + up-to-date check
A route the generator cannot resolve is a hard error, never a silent fallback: in production a silent fallback means an invisible badge.
dsh plugin --profile web add github:Townrain/dsh-model-vendor-badge
Or from a local clone:
dsh plugin --profile web add /path/to/dsh-model-vendor-badge
Refresh the page after installation.
DSH_CHECKOUT=/path/to/deepseek-harness node build.mjs
build.mjs resolves the checkout's esbuild + typescript, junctions the client
type dependencies into node_modules/, and emits lib/index.js (host,
no-op) + lib/client.js (browser bundle, __ModuleLoader__ format) +
lib/types/ declarations.
When only client rendering changed and no checkout with built declarations is at hand, rebuild the bundle alone:
node build-client-only.mjs --esbuild <path/to/esbuild/>
npm run verify # verify-client.mjs + verify-icons.mjs
npm run audit:startup # static startup-safety audit
npm run icons:check # generated module in sync with sources.json
verify-client.mjs loads lib/client.js and asserts the
__ModuleLoader__ registration, the absence of a module-level inject
gate, that the healthy path really registers into
conversation.input.right, and that a missing service only warns instead of
parking the entry.verify-icons.mjs asserts the DeepSeek family shares one whale, that no
route is wired to an upstream placeholder, that every route the pi-ai catalog
can report has a glyph or an explicit fallback identity, and that the
generated module matches the registry.This package declares the fields defined by @deepseek-ai/dsh-package-manifest
(shipped inside the installed app.asar, runtime 0.2.2-rc.2):
{
"icon": "icon.svg", // package-root icon, <=256 KiB, realpath must stay inside
"engines": { "dsh": ">=0.1.5-rc.1", "node": ">=20.0.0" },
"dsh": {
"manifestVersion": 1, // format version, independent of npm and Session versions
"bundle": {
"patch": "./cordis.patch.yml",
"platforms": ["darwin", "linux", "win32", "wsl"],
"listedByDefault": true
},
"client": { "platform": "web", "inject": [ "..." ] }
}
}
Two of the four are hard gates, not documentation — worth knowing before you copy the block:
| Field | Reader | When it does not hold |
|---|---|---|
dsh.bundle.platforms |
assertBundlePlatform (boot + plugin manager) |
throws and skips the bundle; the list must be nonempty and contain only Node platform names or wsl |
engines.dsh |
evaluatePluginCompatibility (boot + install) |
every row of the plugin is disabled and installation is refused; recovery needs a dsh plugin allow-version exact-version exemption |
dsh.manifestVersion |
no enforcing reader today | declarative only |
dsh.bundle.listedByDefault |
Plugin Manager GUI lists | visibility only (false = hidden by default, still manageable) |
One more engines.dsh detail: when present it decides alone and
peerDependencies are ignored entirely. This package therefore does not
lean on a peerDependencies: { "@deepseek-ai/dsh-*": "*" } safety net — those
entries are for tooling only.
npm run verify:manifest # checks icon / platforms / engines.dsh / client against the reader rules
injectThis was the one way this plugin could stop dsh from booting at all; it is deliberately eliminated.
dsh treats "every plugin activated" as a precondition for starting:
dsh-app-boot: assertEntriesLoaded / assertEntriesActivated@deepseek-ai/dsh-client-web boot.ts: assertEntriesActiveA cordis fiber whose inject list names a service that is not (or is no
longer) provided stays at state 0 (PENDING) forever:
| Form | If a service name is renamed or removed |
|---|---|
export const inject = ['slots','sessions','modelDirectories'] |
entry stays PENDING → dsh fails to boot ("Failed to load plugins") |
ctx.inject([...], scope => …) |
entry activates immediately, callback simply never runs → the badge is missing, one console warning |
This plugin uses the second form, matching what dsh's own client packages do
(dsh-client-ui-model-selection: ctx.inject(['slots','modelDirectories'], …)).
The three service names are resolved inside the callback through scope, and
the readout warns loudly rather than failing silently when they are absent.
Guard it on every rebuild:
npm run audit:startup
The audit asserts (static, no running instance required) that the bundle
exports no hard inject gate and that its runtime require() surface stays
inside the platform seed words — both derived from the running dsh rather than
hardcoded. It exits non-zero if either regresses.
An adversarial review of this hardening confirmed the activation-gate claim and falsified the absolute form of it. Two whole-surface paths remain, and neither is fixable from a plugin:
require() calls are react and react/jsx-runtime. They resolve against
a frozen 9-word table (PLATFORM_MODULES in
packages/client/web/src/platform.ts). If a future dsh drops or renames
react in that table, this bundle fails to materialize exactly as hard as
the old inject list did. The audit catches the change; only a rebuild can
act on it.apply(). apply runs on the entry's own fiber,
so a throw there still marks the entry FAILED. The whole body is wrapped in
try/catch precisely because ctx.inject is a cordis registry mixin, not
a Context method — the same class of rename that 0.1.5 already performed
on dsh-client-runtime. Anything thrown outside that wrapper would still be
fatal.dsh.plugin.json is not read by the current dsh — no consumer exists in
the @deepseek-ai/dsh package tree. The authoritative manifest is
package.json (dsh.bundle, dsh.client). The file is retained only for
compatibility with older tooling, with its version kept in step.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: session。