Bundle
dsh-runninghub-api
DeepSeek Harness plugin: run RunningHub cloud ComfyUI workflows — settings card, media upload cache, concurrency gate, background tasks. · DSH 插件:在对话里运行 RunningHub 云端 ComfyUI 工作流。
- Source
- lucyTrump
- License
- MIT
- Updated
- Updated yesterday
Readme
# dsh-runninghub-api
English | [中文](README.zh.md)
A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) plugin that integrates [RunningHub](https://www.runninghub.cn) cloud ComfyUI workflows: a settings card for your API key and workflow library, eight `runninghub_*` tools for agents, a sha256 media upload cache, a local concurrency gate with FIFO queueing and timeouts, background tasks with completion notifications, and a durable task ledger with automatic restart recovery.
## Install
```sh
dsh plugin --profile web add dsh-runninghub-api
```
or install/update from the in-app plugin market (dshmarket). Then open **Settings → Plugins → RunningHub** to add your API key and workflows.
## Settings (`runninghub` namespace)
| Field | Default | Purpose |
|---|---|---|
| `apiKey` | — | Literal key (`role('secret')`); prefer `apiKeyEnv` |
| `apiKeyEnv` | `RUNNINGHUB_API_KEY` | Credential reference resolved per request |
| `baseUrl` | `https://www.runninghub.cn` | OpenAPI base |
| `pollIntervalMs` | `5000` | Status poll interval (min 1000) |
| `runTimeoutMs` | `3600000` | Run-phase timeout (0 = unlimited) |
| `queueTimeoutMs` | `0` | Queue-phase timeout (0 = unlimited) |
| `maxConcurrentTasks` | `3` | Local concurrency gate |
| `uploadUseLegacy` | `false` | Legacy multipart upload endpoint |
| `workflows` | `[]` | Saved workflow definitions |
## Tools
`runninghub_list_workflows`, `runninghub_fetch_workflow`, `runninghub_run_workflow` (two-phase: reports missing required params/media as `needs_input` instead of submitting), `runninghub_get_task`, `runninghub_list_tasks`, `runninghub_cancel_task`, `runninghub_upload_file` (sha256-deduplicated), `runninghub_refresh_workflow`.
## Remote (`ctx.remote.runninghub`)
`fetchWorkflow` (workflow JSON fetch + parse), `validateWorkflow` (free dry-run payload assembly), `runTest` (real paid submit for the settings card), `testConnection`. The browser half self-mounts this namespace via `ctx.remote.$mount()` at startup.
## Development
```sh
pnpm install # canonical (npm registry)
pnpm build # Typert artifacts + host lib + client bundle
pnpm test # vitest
pnpm typecheck
```
Offline against a local deepseek-harness checkout (no registry access):
```sh
node scripts/link-local-dsh.mjs [/path/to/deepseek-harness]
pnpm build
```
Note: when link-installed into a live dsh profile (`dsh plugin add <this dir>`), the
`@deepseek-ai/*` entries in node_modules must be symlinks into the local DSH
checkout — real npm copies would duplicate the cordis singleton. Re-run
`node scripts/link-local-dsh.mjs` after every `pnpm install`, before restarting dsh.
Local install into the web profile (link install; rebuilds are picked up on restart):
```sh
dsh plugin --profile web add /path/to/dsh-runninghub-api
```
`tests/` covers the gateway against a mocked fetch (endpoints A–F, status codes 0/804/805/813, secret masking, no-key fast-fail), workflow prompt mapping, payload validation/override reconciliation, and the media cache.
## License
[MIT](LICENSE)
Install
dsh plugin --profile web add github:lucyTrump/dsh-runninghub-api
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-runninghub-api from the hub
- This package builds from source on install. pnpm will ask you to allow its build script — that is permission to run the package’s code on your machine, outside the agent sandbox. Only allow sources you trust.
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.