rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:TonyWu2333/dsh-mercury-diffusion
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Watch a diffusion LLM think — live, inside your DeepSeek Harness chat.
A DeepSeek Harness (dsh) plugin that streams the real denoising frames of Inception Mercury and plays them in the answer bubble, from noise to finished text.
English · 简体中文
diffusing: true), replayed at a readable pace.diffusing is measured with a request that is rejected before any token is generated. No model-name guessing, no billed tokens.diffusion.<provider>::<model>) and survives restarts.Requirements: dsh >=0.2.1-rc.2 <0.3.0, Node ^22.19 || >=24, and pnpm on your PATH (dsh plugin uses it to manage profile plugins).
dsh plugin --profile web add dsh-mercury-diffusion
dsh web
git clone https://github.com/TonyWu2333/dsh-mercury-diffusion.git
cd dsh-mercury-diffusion
npm install
npm pack
dsh plugin --profile web add ./dsh-mercury-diffusion-0.2.1.tgz
dsh web
Open Settings → Models → Add model provider → Custom model API and fill in:
| Field | Value |
|---|---|
| Provider ID | inception |
| Display name | Inception |
| Base URL | https://api.inceptionlabs.ai/v1 (must include /v1) |
| API protocol | OpenAI Chat Completions |
| API key | your Inception API key |
| Models | Add model → mercury-3 (or mercury-2.5, mercury-2) |
Then click Create provider.
[!WARNING] Don't point the built-in DeepSeek card at Inception. That adapter speaks a different protocol, and requests fail with
404.
cordis.patch.yml# ~/.dsh/profiles/web/cordis.patch.yml
- id: llm-pi-ai
name: "@deepseek-ai/dsh-llm-pi-ai"
config:
providers:
inception:
displayName: Inception
api: openai-completions
baseURL: https://api.inceptionlabs.ai/v1
apiKeyEnv: INCEPTION_API_KEY # a credential reference, not the key itself
models:
- id: mercury-3
name: Mercury 3
contextWindow: 1000000
maxTokens: 131072
Use the bare model id (mercury-3) when calling Inception directly. Gateways that aggregate providers usually expect the prefixed form (inception/mercury-3).
Pick the Mercury model from the model selector next to the send button and start a new conversation. A floating button appears on the right edge; switch diffusion on and send a message.
flowchart LR
A["dsh llm/stream"] -->|"capable model, toggle on, session watched"| B["Bridge<br/>re-sends with diffusing: true"]
A -->|"anything else"| Z["Original adapter"]
B --> C["Mercury SSE<br/>full text per frame"]
C -->|"first frame"| H["Empty block-start<br/>bubble appears at once"]
C -->|"intermediate frames"| D["DiffusionHub"]
D --> E["/api/mercury-diffusion/frames<br/>SSE, Connection exact route"]
E --> F["Browser frame source<br/>paced replay in the bubble"]
C -->|"after convergence:<br/>final text-delta / block-end"| G["Session log & conversation"]
StreamChunk protocol only appends text-delta, while a diffusion frame replaces the whole text. Frames therefore travel on a side channel, and only the converged text is persisted as a normal assistant message, which keeps dsh's "model-visible ⟺ logged" invariant.diffusing is requested only while a browser is watching. The floating button component also holds the frame subscription, which is the "someone is watching" signal. Title generation, compaction, and headless/ACP runs always use plain incremental streaming.messages: [] with diffusing set to an invalid type. Validation rejects it with 400 before generation; only a server that knows the field also reports a type error at loc: ["body","diffusing"]. The verdict (yes / no / unknown) is cached per provider::model in the process; unknown is kept for 60 seconds only.diffusing before the first frame, the request falls back too. A user abort ends the turn instead of re-sending on an aborted signal.max / xhigh) and temperature ranges differ from Inception's, so the bridge drops reasoningEffort and temperature and adds diffusing: true. max_completion_tokens, stop, and tools are forwarded.dsh exposes no extension point for the body of assistant messages, and keyed slots can only be replaced, not wrapped. The plugin therefore registers conversation.chat.node[assistant-step] at a higher priority, so assistant messages from every model render through it. The normal path is ported from dsh ui-chat's AssistantNodeView (MIT, see THIRD_PARTY_NOTICES.md).
MarkdownText), file links, step folding, and the official reasoning-body and image-gallery factories.0.1.x registered its own mercury provider, with the API key read from INCEPTION_API_KEY or set on the plugin's settings page. Both are gone in 0.2: add the Inception route as shown above and point your default model at it. Conversations pinned to the old mercury provider need a model re-selection.
A route that names no credential reference (no apiKeyEnv in its profile and no auth variable declared by its adapter) is never bridged, so the plugin never sends one provider's key to another provider's host. Keys entered on the Models page are stored as references automatically.
| Symptom | Likely cause |
|---|---|
DeepSeek Messages request failed (404) |
The Inception URL was entered on the built-in DeepSeek card. Add a Custom model API route instead. |
| The floating button never appears | The route has no credential, or the probe returned unknown. Check detail in the status payload (see below). |
| No animation, plain streaming | Diffusion is off for this model, the turn has attachments, or no browser tab is watching the session. |
To log frame receipt and bubble claiming, run this in the browser console and reload:
localStorage.setItem('dsh-mercury-debug', '1')
The last status payload is kept in localStorage['dsh-mercury-last-status']. Its detail field names the step that decided the verdict (measured, no-route, no-credential, or no-selection).
cordis.yml, so playback pacing and reconnect backoff are constants in code.reasoningEffort or temperature (see design notes).git clone https://github.com/TonyWu2333/dsh-mercury-diffusion.git
cd dsh-mercury-diffusion
npm install
npm run typecheck
npm test # node --test, including assembly checks against dsh's real BlockAssembler and end-to-end frame-channel tests
npm run build # lib/index.js (host, ESM) + lib/client.js (dsh client-module closure format)
The build enforces bundle purity: the client bundle may only require modules from dsh's PLATFORM_MODULES and must not inline any @deepseek-ai/* runtime code.
scripts/mock-mercury.mjs is a local stand-in for the Mercury endpoint (http://127.0.0.1:18931/v1; tune with MOCK_PORT, MOCK_STEPS, MOCK_STEP_MS). It returns step-by-step denoised text for diffusing requests and plain deltas otherwise. To connect it, add a route on Settings → Models → Add model provider → Custom model API, no config file needed:
| Field | Value |
|---|---|
| Base URL | http://127.0.0.1:18931/v1 |
| API protocol | OpenAI Chat Completions |
| Models | mercury-3 |
| API key | anything; the mock doesn't check it |
[!NOTE] Since 0.2 the plugin decides capability with a probe that the mock doesn't answer the way Inception does, so the toggle stays hidden against it. Use a real Inception key to try the full diffusion flow.
diffusing streaming mode.Thanks to the LINUX DO community.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: diffusion-llm、deepseek-harness。