DSH WorkBuddy Connect
corrinehu/dsh-workbuddy-connect将 WorkBuddy 桌面 App 包含的模型自动接入 DeepSeek Harness,在 DSH 对话窗口里零配置使用。
DeepSeek Harness 的 Ollama 接入:模型管理、健康检查、基于规则的本地路由与云端回退。
npm i -g dsh1024 once, then dsh1024 plugin --profile web add dsh-local-ai (counts toward the deepseek1024.com install ranking).Local-model (Ollama) integration for DeepSeek Harness.
*Discover, pull, remove, and inspect local models, route requests to them by task type or keyword with automatic fallback to the cloud, and get a one-shot status overview via /ollama.*
Official repository. This is the only official repository of dsh-local-ai, maintained by PerryLink. Same-name repositories under other accounts are not affiliated.
English · 简体中文 · Español · Português · हिन्दी
dsh plugin --profile <name> add dsh-local-ai📖 Ecosystem knowledge base — measured data, not marketing: plugin development guide · plugin-selection data · maintenance criteria.
main): dsh plugin --profile web add github:PerryLink/dsh-local-ai — the prepare script builds with production dependencies only.dsh plugin --profile web add dsh-local-ai.pnpm pack in this repo, then dsh plugin --profile web add ./dsh-local-ai-.tgz.dsh plugin --profile web remove dsh-local-ai (or remove the row from the profile patch).If pnpm reportsERR_PNPM_IGNORED_BUILDSfor this package, addallowBuilds: { esbuild: true }to yourpnpm-workspace.yaml— thedshCLI prints the exact snippet.
这个插件是 DSH 插件家族的一员(95 个,全部 Apache-2.0)。如果你在用,给个 star —— 它不会解锁任何功能,但会让下一个人在搜索里更容易找到它。
*English:* part of a 95 plugin family for DeepSeek Harness. If it is useful, a star helps the next person find it — nothing is gated behind it.
Local-model (Ollama) integration for DeepSeek Harness.
Discover, pull, remove, and inspect local models, route requests to them by task type or keyword with automatic fallback to the cloud, and get a one-shot status overview via /ollama.
*Workflow overview: call → plugin → result. The examples below use the real command surface.*
Surface · Status Harness · DeepSeek Harness dsh-v0.2.1-alpha.1 (verified 2026-10-04: three typecheck rulers (installed, CI, checkout) + 142 tests + self-contained/artifacts gates; the 0.1.7 content-block union is adapted — a tool result is a first-class tool-role message, and a pre-0.1.7 tool-result wrapper is still read for old logs). The peer range admits every supported line: >=0.1.2-rc.1 =0.1.5-alpha.1 =0.1.6-0 =0.1.7-0 =0.2.0-0 =0.2.1-0 =24.0.0 Backend · Ollama (local HTTP API + CLI probe) Model · Text-only route (inputModalities: ['text']); tool calls and tool results are supported
dsh-local-ai makes Ollama a first-class local provider in DeepSeek Harness:
ollama_list (installed models, running models, disk usage), ollama_show (parameter size, quantization, context length), ollama_pull, and ollama_remove.ollama CLI) and API responsiveness (via /api/version), reported as two independent signals.ollama provider route is registered through ctx.llm.registerAdapter (LlmAdapter), with configurable model mapping and temperature / max-tokens / stop translation.--server each register as their own openai: provider through the same LlmAdapter seam, reusing one OpenAI /v1/chat/completions adapter (text-only route).model_route rules route requests to a local model by task type (purpose), case-insensitive keyword, or always, with automatic fallback to the cloud when the local route fails before producing content.request (loop)
│ llm/stream waterfall
├─ rule matches? ──▶ route to ollama ──▶ Ollama /api/chat (NDJSON stream)
│ └─▶ route to openai:<name> ─▶ /v1/chat/completions (SSE)
│ └─ fails first ─▶ fall back to cloud (next())
└─ no match ──▶ cloud provider
tools ──▶ /api/tags · /api/ps · /api/show · /api/pull · /api/delete
health ──▶ /api/version (API) + ollama list (process)dsh plugin --profile web add github:PerryLink/dsh-local-ai# 1. install the bundle into your profile
dsh plugin --profile web add github:PerryLink/dsh-local-ai
# or from npm (published releases)
dsh plugin --profile web add dsh-local-ai
# 2. configure routing in your profile patch (cordis.yml) and restart
dsh --profile webMinimal routing configuration (the rule ships commented out in cordis.patch.yml):
- insert:
- id: dsh-local-ai
name: dsh-local-ai
config:
route:
- model: llama3.2
keywords: ["confidential", "offline"]Then verify the row mounts:
dsh --profile web --dump-config | grep -A2 'id: dsh-local-ai'These are the plugin's real entry points; install once, then call one.
Command
~~~sh ollama_list ~~~
Input
~~~json {} ~~~
Output
~~~text 1 local model(s), 100 B on disk
~~~
*Observed from plugins/dsh-local-ai/src/index.ts:83-90 (renderer); fixture/assertion at plugins/dsh-local-ai/test/index.spec.ts:31-35,68-82*
Input
~~~text {} (baseURL http://127.0.0.1:11434; nothing listening; no ollama binary on PATH) ~~~
Output
~~~text { "api": { "ok": false, "error": "connection refused" }, "process": { "present": false, "error": "\"ollama\" not found: subprocess-local: command \"ollama\" was not found on PATH" } } ~~~
*Observed from plugins/dsh-local-ai/src/health.ts:52-66,79-92; plugins/dsh-local-ai/test/health.spec.ts:23-28,52-57*
ollama_showollama_pullAll tunables are Schemastery Config fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. cordis.patch.yml documents each key inline.
Key · Default · Meaning baseURL · http://127.0.0.1:11434 · Ollama HTTP API base URL; /api/* paths are appended requestTimeoutMs · 30000 · Per-request HTTP timeout (milliseconds) graceMs · 15000 · Subprocess terminate grace for the health-check CLI probe defaultContextWindow · 8192 · Context capacity used when a model has no exact value maxTokens · 4096 · Per-request output cap used when a model has no exact value temperature · *(none)* · Default sampling temperature (0..2); omitted leaves the provider default vision · true · Declare and serialize image support when the model reports vision; false keeps the route text-only visionCacheTtlMs · 30000 · Milliseconds a /api/show capability probe stays cached (0 disables caching; a pull or remove invalidates that model) models · [] · Harness-visible → Ollama model mappings models[].name · *(required)* · Harness-visible model name (GenerateOptions.model) models[].model · = name · Ollama model id models[].contextWindow · *(none)* · Per-model context capacity models[].maxTokens · *(none)* · Per-model output cap models[].temperature · *(none)* · Per-model sampling temperature backends · [] · OpenAI-compatible local backends (LM Studio / vLLM / llama.cpp) backends[].name · *(required)* · Backend name; registers provider id openai: backends[].baseURL · *(required)* · Backend base URL including /v1, e.g. http://127.0.0.1:1234/v1 backends[].apiKey · *(none)* · Optional bearer API key (most local servers leave it empty) backends[].models · [] · Harness-visible → backend model mappings backends[].maxTokens · 4096 · Per-backend output cap used when a model has no exact value backends[].temperature · *(none)* · Per-backend sampling temperature route · [] · Local-model routing rules (first match wins) route[].model · *(required)* · Target local model name route[].provider · ollama · Target provider id: ollama or openai: route[].purpose · *(none)* · Task type match: compaction / session-title route[].keywords · [] · Case-insensitive request keywords route[].always · false · Route every eligible request to this model
Surface · Kind · What it does ollama_list · tool · List installed models, running models, and disk usage ollama_show · tool · Show parameter size, quantization, context length, family, format ollama_pull · tool · Pull (download) a model ollama_remove · tool · Remove a model ollama_health · tool · Process liveness + API responsiveness /ollama · command · One-shot status overview (models + health + suggestions)
Consumes the public host services ctx.llm (registerAdapter), ctx.tools, ctx.subprocess (CLI probe), and ctx.commands. It registers no llm/stream short-circuit by default — the routing listener passes through (next()) unless a rule matches.
network:outbound to the Ollama endpoint you configure; no native code, no filesystem access, no storage.ollama list process probe.route list is empty unless you opt in; a request reaches a local model only through an explicit rule or an explicit ollama provider selection./ollama command, or error messages.next()), so a down Ollama never bricks a conversation. One carve-out: a failure carrying IMAGE_OFFLOAD_REQUIRED is rethrown instead of retried on the cloud — that code is the official offload circuit asking this same local route to drop retained images, and falling back would skip the circuit while silently sending a local-only request to a remote provider.ollama provenance); no new model-visible input is invented.@deepseek-ai/dsh@0.2.0-rc.2; newer harness baselines are expected to work but are verified by the monthly compat workflow./api/show capabilities include vision declare inputModalities: ["text","image"] and carry base64 image payloads on user messages (opt out with vision: false); text-only models still reject image content (UNSUPPORTED_CONTENT).pnpm install # node ^22.19 || >=24
pnpm run typecheck # tsc: src + tests against the published 0.2.0-rc.2 types
pnpm run typecheck:ci # strict tsc against published rc.2 types (skipLibCheck off)
pnpm test # vitest: real Context/LlmRuntime/ToolRuntime/CommandRuntime/subprocess seams
pnpm run test:coverage # coverage gate (90/80/90/90)
pnpm run build # tsdown bundle + tsc declarations (lib/)
pnpm run verify:self-contained # dependency specs resolve from the registry
pnpm run verify:artifacts # built ESM face + bundle patch present
node scripts/check-readme-sync.mjs # five-language README sync gate
node scripts/check-endpoints.mjs # M3 endpoint-liveness probe (Ollama /api/version)
pnpm pack # the published tarballVerified against DSH `0.2.0-rc.2` (the runtime this README ships for) and the high-star plugin set surveyed on 2026-10-05.
This plugin does not interfere with other plugins, including the widely installed high-star ones:
shadows-shipped-ui seat.webServer prefix.inserts its own row; it never overrides a built-in row's config.process.env, or replace the global fetch dispatcher.Shared event listeners are non-interfering by construction. It observes the ordering-sensitive event llm/stream with ctx.on() — Cordis's broadcast registration, where every listener runs and none can starve another. Every listener here delegates through `next()`, so the chain is never short-circuited, and a mutation is applied to the value next() produced rather than returned in its place:
llm/stream — also used by dsh-routing-suite (7000★).Static evidence: dsh-plugin-doctor K10–K13 report pass for every check on this repository.
dsh, dsh-plugin, deepseek-harness, deepseek, cordis, ollama, local-llm, local-models, offline, privacy, model-routing
This project is part of the DeepSeek Harness plugin family from PerryLink. The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.
Expand all plugins
Plugin · Status dsh-aqua-input-check · dsh-archive-check · dsh-auto-review · dsh-autotier · dsh-bid-ca-precheck · dsh-bid-qual-check · dsh-cert-mcp · dsh-checkpoint-rewind · dsh-click · dsh-composer-history · dsh-contract-stance · dsh-customs-doc-check · dsh-data-quality · dsh-demurrage-ledger · dsh-doublecheck · dsh-drill-script-check · dsh-eia-guide-check · dsh-emergency-plan · dsh-essay-rubric-check · dsh-evidence-check · dsh-export-ctl-check · dsh-fast · dsh-fmea-table-check · dsh-forecast-penalty · dsh-fund-research · dsh-github · dsh-gongwen-flow-check · dsh-gongwen-word-check · dsh-guard-plan-qc · dsh-hazchem-check · dsh-hazplan-check · dsh-hidden-risk-map · dsh-hs-classify · dsh-icd-rule-check · dsh-industry-research · dsh-lawcite-adapter · dsh-laya · dsh-lc-doc-check · dsh-learning-gap-check · dsh-library · dsh-local-ai · dsh-lsp-actions · dsh-mask · dsh-mcp-panel · dsh-medrec-qc · dsh-memento · dsh-nsfc-form-check · dsh-nurse-record-check · dsh-observe · dsh-origin-rvc-check · dsh-ota-review-check · dsh-output-styles · dsh-paper-doc-adapter · dsh-permission-rules · dsh-permit-report-check · dsh-pipeline-check · dsh-pleading-draft · dsh-plugin-doctor · dsh-plugin-guide · dsh-plugin-kit · dsh-plugin-upgrade · dsh-policy-brief-draft · dsh-power-loss-split · dsh-power-ticket-check · dsh-ppap-check · dsh-protest-deadline · dsh-railway-window · dsh-repair-order-qc · dsh-research-report · dsh-review-reply-check · dsh-rulefile-check · dsh-safety-brief-check · dsh-score · dsh-session-sync · dsh-site-log-check · dsh-skill-pack-security · dsh-soe-decision-check · dsh-soilwater-check · dsh-sop-sync-check · dsh-spc-gbt-adapter · dsh-talk · dsh-tender-extract · dsh-tender-matrix · dsh-test-drive · dsh-ticktick · dsh-translate · dsh-warranty-calc · dsh-budget · 🧊 FROZEN — see the repo README | dsh-claude-move | 🧊 FR