rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:dev-bravelo/dsh-hf-spaces
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Run open-weight LLMs on your own GPU virtual machine on Hugging Face (a GPU Space) and use them inside DeepSeek Harness like any other model. The plugin starts the machine when you send a message, shows the start progress, answers through your own model, and pauses the machine when you stop using it, so the GPU bills only while it is used.
Status: alpha, not released. Everything planned for the plugin itself is in place and was tested on a real private Space on 2026-10-31 (see Compatibility). Not published on npm yet; see CHANGELOG.md. The design is in docs/design.md.
Use it responsibly. You choose and run the models; the plugin adds no content filter. Read Responsible use before you install it.
/space status | on | off | +N and the buttons, which never send anything
to the model.A Hugging Face Space is a virtual machine that Hugging Face runs for you. On GPU hardware
(for example an A100), it is billed per minute while it starts and runs, and costs nothing while
paused. Your Space runs an OpenAI-compatible server (for example llama.cpp llama-server) with
the model weights you choose.
DeepSeek Harness (your computer) Hugging Face (your account)
┌────────────────────────────────┐ ┌──────────────────────────────┐
│ model selector: "My LLM" │ │ GPU Space (virtual machine) │
│ you send a message ────────────┼── is it serving? ─►│ paused → started by the │
│ │ │ plugin (API) │
│ header: "starting 42% · ~2 min"│◄── progress ───────┤ booting → copies and loads │
│ │ │ your weights │
│ the answer streams back ◄──────┼── your model ──────┤ serving → OpenAI-compatible │
│ │ │ API (/v1) │
│ idle 30 min / limit 60 min ────┼── pause ──────────►│ paused → billing stops │
└────────────────────────────────┘ └──────────────────────────────┘
https://<subdomain>.hf.space), with your token. No third-party inference service is
involved.Private Spaces keep your weights and your Space private to your account: only a token with access to the Space can call it. Hugging Face still runs the machine, so its Privacy Policy applies to what runs there.
The plugin drives a Space you already have running your model. It does not create the Space, choose its hardware, install an inference engine or upload weights: that infrastructure is yours to build and configure on Hugging Face, once.
| You set up, on Hugging Face | The plugin does, in DeepSeek Harness |
|---|---|
| The Space (a Docker Space), private or public | Puts its models in the model selector |
The machine: a GPU hardware flavor, such as an A100 or an L40S, in the Space settings (or hardware in the configuration) |
Starts the Space through the Hugging Face API, and pauses it |
| The inference engine that runs the model and serves an OpenAI-compatible API (see below) | Waits until the engine lists your models, then sends the conversation |
| The weights: where they live (a storage bucket mounted as a volume, the Space repository, or a download at boot) and how the engine loads them | Shows the start progress, from the Space state and from optional progress lines in its log |
| The chat template and the reasoning-effort values it accepts | Offers in the selector only the effort levels you declare, and checks them at the first start |
| The Space sleep time, the safety net when the Harness is closed | Applies its own idle and time-limit rules while the Harness is open |
| Space secrets the engine itself needs | Writes the start variables you declare (never secrets) |
Any engine that serves GET /v1/models and POST /v1/chat/completions at the Space's address
should work:
llama-server: tested (a 27B GGUF model on an A100, 2026-10-31).What the engine side needs:
app_port in the Space README,
7860 by default) and serve the API under /v1 at the Space root, or set baseURL in the
configuration;GET /v1/models exactly as you write them in the configuration;reasoning_effort with the values you map in reasoning, or declare
reasoning: false for a model without effort control;--mmproj projector) and declare input: [text, image] for that model, in the configuration
or in the Space's dsh-hf-spaces.json manifest. Without it, the Harness treats the model as
text only and refuses images to it.Optional, for a better experience: progress lines in the Space log (SPACE_EVENT {...}), a
dsh-hf-spaces.json manifest so users only need the Space id, and start variables for a Space
that needs a fresh value at each boot. All three are described in docs/design.md.
A reference Space template may come later.
This plugin is a tool to run models you choose on a machine you control. It adds no content filter, and a model with fewer refusals will answer requests that hosted assistants decline. That freedom comes with responsibility, and it is yours.
By using this plugin you agree to:
Do not use this plugin, or the models you run with it, to:
If other people use your setup, add your own safeguards: a system prompt that sets limits, review of what is produced, and restricted access to the Space and its tokens.
No warranty. The software is provided "as is" under the MIT License. Its authors are not responsible for how it is used, for what the models produce, or for charges on your Hugging Face account.
GET /v1/models, POST /v1/chat/completions).For people and for AI agents. Each step says what you should see; stop at the first step that does not match, and fix it before going on.
AI agents: never ask for a token in the chat, and never write one to a file yourself. Step 3 is the user's.
Get the package. Download dsh-hf-spaces-<version>.tgz from the
latest release, or build it from the
source (needs Node.js 22 or later and Git):
git clone https://github.com/dev-bravelo/dsh-hf-spaces.git
cd dsh-hf-spaces
npm pack
You should have a file dsh-hf-spaces-<version>.tgz. There are no dependencies to install.
Install it in your Harness profile. In a Harness session, ask the agent to install the
bundle from that file with the plugin manager (plugin_manager → install_bundle, with the
absolute path of the .tgz). You should see dsh-hf-spaces listed as installed and enabled.
incompatible-version: your Harness is outside the supported
range (see Compatibility).Store your Hugging Face token (the user does this, outside any chat). Create a token at
https://huggingface.co/settings/tokens with the permissions in Credentials.
Then put it in the Harness credential vault under the name HF_TOKEN, in one of these ways:
<Harness home>/.credentials.yaml, under refs: (the Harness reloads it by itself):version: 1
refs:
HF_TOKEN: <your token>
HF_TOKEN before the Harness starts, or in
<Harness home>/.env.<Harness home> is ~/.dsh, or $DSH_HOME when set. Keep the file private: it holds keys.
Tell the plugin about your Space. Add this entry to your profile's patch file,
<Harness home>/profiles/<profile>/cordis.patch.yml (a YAML list; add the entry to it):
- id: hf-spaces
name: dsh-hf-spaces
config:
spaces:
- id: your-user/your-llm-space # your Space, owner/name
models:
- id: your-model-id # exactly as GET /v1/models lists it
name: My model 27B # the name shown in the model selector
reasoning: { "off": none, low: low, medium: medium, high: high }
Every other field has a default; all of them are in
examples/config.example.yml. models may be left out when the
Space publishes a dsh-hf-spaces.json manifest (design, section 6).
Restart the Harness and open Plugins → dsh-hf-spaces. Every check should read "ok": credentials accepted, Space read, models listed. "Models served" and "Effort levels" read "later" until the first start.
Use it. Pick your model in the model selector and send a message. The plugin starts the
Space and shows the progress in the conversation header; the answer comes when the model is
ready. Press Stop in the header, or send /space off, when you are done.
To remove it: delete the hf-spaces entry from the profile patch and uninstall the bundle
with the plugin manager. The Space itself is left as it is: pause it on Hugging Face if it runs.
The configuration never contains a token. It only names a credential stored in the
Harness vault, and the default name is HF_TOKEN. The sidebar tab and the setup page show
whether each credential is in the vault, whether Hugging Face accepts it, its account and its
token role, never its value.
| Setting | Required | Used for | Token permission on Hugging Face |
|---|---|---|---|
credentials.inference |
Yes | Sending requests to the model in a private Space | Read access to the Space |
credentials.control |
Yes, to start and stop | Starting, pausing and restarting the Space | Write access to the Space |
credentials.billing |
No | What Hugging Face billed for each Space today and this month | Read access to billing |
A complete, commented example is in
examples/config.example.yml. The only required field per Space is
its id (owner/space-name).
<Harness home>/state/dsh-hf-spaces
(stateDir changes it).The plugin has two halves, as DeepSeek Harness expects:
| Half | Runs in | Responsibilities |
|---|---|---|
| Host | The Harness backend (Node.js) | Model route per Space; Space supervisor (state, start, stop, idle and time-limit rules, cost); a small Hugging Face API client; its own records of recent starts; local HTTP routes for the interface, guarded by the Harness |
| Client | The Harness window (web UI) | Header indicator, sidebar tab, notices and setup page; reads state from the Host routes; buttons call Host actions |
The Space side is any Space that serves an OpenAI-compatible API, for example llama.cpp
llama-server. If the Space also prints the optional progress events described in the design,
the start progress becomes more detailed (copy percentage, load, warm-up).
https://huggingface.co) and to the Space's own
https://*.hf.space address. Redirects are never followed with a token.connection.requestRejection), accept small bodies only, and offer three actions: start, stop
and extend.pre-commit and commit-msg hooks. See AGENTS.md, section 4.Reporting a vulnerability: see SECURITY.md. Never paste a token in an issue.
| Plugin | DeepSeek Harness | Status |
|---|---|---|
| 0.1.0-alpha.9 | 0.2.1-rc.3 | alpha.8 plus input: [text, image] per model, so a vision model served by the Space can read images in the Harness. Offline and runtime tests on the installed Harness, Windows, 2026-11-01 |
| 0.1.0-alpha.8 | 0.2.1-rc.3 | The full plugin, with the interface redesigned after the first Desktop test (alpha.7): selector, start and resume, progress, /space, stop rules, header indicator, sidebar tab, notices, setup page, billing usage and start records. Offline and runtime tests on the installed Harness, Windows, 2026-10-31. First real start (alpha.7, 2026-10-31, private A100 Space): ready in 3 min 11 s with live progress, stopped by /space off after 18 min, US$ 0.75 estimated. The redesigned header was seen working on the Desktop the same day, in a session switched from another model |
Each release states the Harness versions it was tested on and how it was tested.
When you update DeepSeek Harness:
engines.dsh in package.json, today >=0.2.1-rc.3 <0.3.0-0),
the plugin keeps working with no change.incompatible-version, and the fix is a newer plugin release, not a workaround.How the plugin is kept compatible is a contributor rule: AGENTS.md, section 7.
No. You build the Space on Hugging Face: the GPU hardware, the inference engine (for example
llama.cpp llama-server, Ollama or vLLM), the weights and the sleep time. The plugin then starts,
watches, uses and pauses that Space from DeepSeek Harness. See
What you set up, and what the plugin does.
Serve it from a GPU Hugging Face Space with an OpenAI-compatible server (for example llama.cpp
llama-server), install this plugin, and add the Space id to your profile
(Installation). The model then appears in the Harness model selector like any
other model.
Yes. You choose the weights your Space serves, including fine-tunes with fewer built-in refusals, as long as the model's license and the Hugging Face terms allow your use. Read Responsible use first.
The plugin pauses the Space after 30 minutes without requests, at a 60-minute limit per start
(both configurable, the limit can be extended), and when you press Stop or send /space off. A
paused Space is not billed. When the Harness is closed, only the Space's own sleep time stops it.
Hugging Face bills the GPU per started minute while the Space starts and runs: an A100 large is US$ 2.50 per hour (pricing, read on 2026-10-31). A real 18-minute session with a 27B model cost about US$ 0.75. The plugin shows the cost of each start and what the Space was billed today and this month.
Hugging Face requires a paid plan for Docker or Gradio Spaces on GPU, and PRO also raises the storage for your weights. See Requirements.
About 3 minutes for a 27B model on an A100: the GPU starts, the weights are copied from a storage bucket, loaded, and warmed up. The progress shows in the conversation header. A GPU queue on Hugging Face can add time.
A private Space can be called only with a token that can read it. The plugin sends your requests only to your Space and to the Hugging Face API, with no telemetry. Hugging Face runs the machine, so its Privacy Policy applies there.
Any server with an OpenAI-compatible API (GET /v1/models, POST /v1/chat/completions).
Tested with llama.cpp llama-server serving a 27B GGUF model on an A100.
No. Hugging Face does not expose the balance through its API; check it on your billing page. The plugin shows what was billed instead.
Yes. Installation is written for agents too, with expected results and stop conditions. The token step is always yours: an agent must never ask for a token in the chat.
Within the supported version range it keeps working; outside it, the Harness refuses to load it and says so, instead of failing in the middle of a conversation. See Compatibility.
| Phase | Delivers | State |
|---|---|---|
| 0. Contracts | Verify, on the installed Harness, the client plugin format, slots, local routes and credential APIs, and the Hugging Face Space endpoints | Done |
| 1. Host | Model routes and Space supervisor, with offline tests | Done |
| 2. Client | Header indicator, sidebar tab, notices and setup page | Done |
| 3. Migration | Replace the private prototype it grew from | Done in a real profile, 2026-10-31 |
| 4. Release 1.0 | Public repository, npm package, compatibility matrix | Next |
Read AGENTS.md first. Its rules apply to people and to AI coding agents alike. In short:
npm run check before every commit.MIT. See Responsible use.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: llm、deepseek、gguf、llm-inference、open-source-llm。