DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Operating Context — DSH Plugin for DeepSeek Harness
← Plugins
O

dsh-operating-context

Operating Context

DeepSeek Harness settings page: cap every configured model service to a working context window, clamped to what each model can actually hold

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:AIMFllyYS/dsh-operating-context#9a78b912cf1f3c98031bd4a6aa77006e4b778b54
READMECompatibilityVersions
Settings → 工作窗口

Compatibility and provenance

Operating Context is published as dsh-operating-context and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
8/20/2026

Versions

0.1.0stable
8/20/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 1
Weekly downloads
0
Last push
8/20/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in models-usage.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with the current session provider's today usage on the sidebar entryUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.Ui Usage Billing@kenz1117/dsh-ui-usage-billingUsage billing dashboard for DeepSeek Harness: sidebar cost metrics plus a full dashboard modal, priced from a current multi-provider catalog with real usage aggregated from session logs.

README

dsh-operating-context

English | 中文

Settings page 工作窗口 for DeepSeek Harness. It caps every configured model service to one working context window — the same contextWindow the adapter, the ContextMeter, and official compaction already read — and never asks a model to hold more than it can.

It does not mount a second compaction engine, wrap resolveModel, or patch adapter config through a bundle patch (a patch replaces the whole row and would wipe keys and endpoints). Everything goes through settings.mutate in the user layer.

GitHub topics: dsh-plugin and dsh.

Compatibility baseline: reviewed against DeepSeek Harness 0.1.0-rc.5 (47f943859bef60e4160492346772ded9b24f765a, 2026-08-14). The Harness plugin surface is still release-candidate software, so rebuild and test this package when moving to a newer Harness release.

Install

This is a DeepSeek Harness bundle. It does not run on its own, and there is no global dsh command unless you put one on PATH. Official Harness entry is npx @deepseek-ai/dsh.

A first-time user needs:

  1. Node.js ^22.19.0 or >=24
  2. pnpm on PATH (corepack enable is enough; dsh plugin forwards to pnpm)
  3. Then the commands below. First npx @deepseek-ai/dsh web also creates the web profile.
npx @deepseek-ai/dsh plugin --profile web add github:AIMFllyYS/dsh-operating-context#v0.1.0

The stable tag above is the recommended install target. The repository ships reviewed, prebuilt lib/ artifacts, so installation does not run package code or require an allowBuilds entry. To test the latest unreleased source instead, omit #v0.1.0; for an immutable development snapshot, pin its commit:

npx @deepseek-ai/dsh plugin --profile web add github:AIMFllyYS/dsh-operating-context#<sha>

From a DeepSeek Harness source checkout, the same verbs go through pnpm dsh instead of npx:

pnpm dsh plugin --profile web add github:AIMFllyYS/dsh-operating-context#v0.1.0

From this plugin's checkout:

pnpm install
pnpm bundle
npx @deepseek-ai/dsh plugin --profile web add .

Confirm the layer, then start the Web UI:

npx @deepseek-ai/dsh --profile web --dump-config   # look for a "# == dsh-operating-context" layer
npx @deepseek-ai/dsh web                           # still port 3080

After install, open Settings → 工作窗口 (between Models and Plugins). That page is this plugin:

Settings → 工作窗口

Pick a size and apply. Models, the usage ring, and official auto-compact follow through the settings event. Leaving and reopening this Settings section restores the common saved choice from each route's defaultContextWindow; per-model native clamps remain visible underneath and do not erase that choice.

An apply can span more than one settings namespace, while Harness mutations are namespace-scoped rather than one cross-namespace transaction. If a later batch fails after an earlier one committed, the page reports the exact completed batch count and reloads the authoritative settings state. It never presents a partial write as a rollback or leaves the pre-write snapshot on screen.

Unload:

npx @deepseek-ai/dsh plugin --profile web remove dsh-operating-context

Written values stay in ~/.dsh/settings.yaml; removing the plugin does not revert them. When the chosen window reaches a catalog model's known native ceiling, this plugin removes its capacity override so the native value can take effect again. Unknown ceilings and explicit models lists cannot be reset that way.

If an authoritative catalog no longer contains a model that still has a modelOverrides entry, the adapter rejects that stale entry and can take down the whole route. The page reports how many such entries an apply will remove; the removal is never attempted when the catalog is unknown.

Troubleshooting installation

If an older revision fails during a Git install with a frozen-lockfile, autoInstallPeers, or allowBuilds message, do not change the consumer profile's pnpm policy to make that revision compile. Git package managers treat build, prepare, prepack, preinstall, install, and postinstall as signals that a repository must be built before installation. Current revisions contain the compiled lib/ files and define none of those Git build triggers.

You can verify a checkout before installing it:

node -e "const p=require('./package.json'); for (const s of ['build','prepare','prepack','preinstall','install','postinstall']) if (p.scripts?.[s]) process.exit(1)"
test -f lib/index.js && test -f lib/client.js && test -f lib/client.js.map

On PowerShell, use:

$p = Get-Content -Raw package.json | ConvertFrom-Json
foreach ($name in 'build','prepare','prepack','preinstall','install','postinstall') {
  if ($p.scripts.$name) { throw "$name must not be present in a Git-distributed package" }
}
Get-Item lib/index.js, lib/client.js, lib/client.js.map

The package's local pnpm-workspace.yaml keeps optional Harness peers out of standalone development installs. pnpm remains the supported development package manager.

What it writes

Capacity spelling matches the Models page: 256K = 256000, not 262144.

The write target follows the profile's shape, because the adapter resolves a capacity as entry.contextWindow ?? catalog.contextWindow ?? defaultContextWindow:

Route shapeWritten
Catalog route with no models listmodelOverrides.<id>.contextWindow, plus defaultContextWindow
Any route with a models listevery models[].contextWindow, plus defaultContextWindow
Hand-declared routedefaultContextWindow only

This is why writing defaultContextWindow alone has no effect on a route whose models come from the installed catalog: the catalog's own value outranks it.

Ceilings

A model is never given a window larger than it can hold. The ceiling is read from the multi-provider adapter's installed catalog through llm.discoverModels, which for a catalog route answers from local data with no network request and no credential. For a hand-declared route, or for llm-deepseek (which registers no discovery), the ceiling is unknown and the page says so rather than guessing.

When the chosen window is at or below a model's ceiling, no override is written and any earlier one is removed — the catalog value is already correct. That is what makes applying idempotent, and what makes choosing a larger window restore native capacities.

Provider compatibility

The algorithm does not contain a provider-name allow-list. OpenCode, Kimi Coding, Anthropic, and other installed llm-pi-ai catalog routes use the same Harness directory contract, local catalog ceilings, and defaultContextWindow/modelOverrides planning. A newly added catalog provider therefore participates without a plugin-specific branch.

A hand-declared or private gateway is deliberately not queried when this page opens: discovery may contact its endpoint and require a credential. If it has an explicit models list, the plugin updates each row's contextWindow while preserving endpoint, protocol, credential, names, output limits, and unknown metadata. Without a list it writes only defaultContextWindow. Such a route's native ceilings remain unknown and the UI says so rather than guessing.

An entirely new independent Harness adapter is compatible when its advertised settings route follows this same capacity shape. The current Harness directory does not expose a generic capability flag for arbitrary future schemas, so the plugin cannot promise model-level clamping for an adapter that does not expose defaultContextWindow, models, or catalog discovery.

Develop

pnpm install
pnpm typecheck
pnpm test
pnpm bundle
npm pack --dry-run

src/index.ts is a Host loader stub; all behavior is in the client bundle. api.ts, capacity.ts, ceiling.ts, and plan.ts are pure and carry the tests; store.ts and the components are the only files that touch platform modules.

lib/ is a committed distribution artifact. After changing src/, rebuild it and include the resulting lib/index.js, lib/client.js, and lib/client.js.map in the same commit. Consumers must never need an install-time build script.

Before publishing or pushing a release candidate, run the commands above twice if build tooling changed and confirm the second build leaves git status clean. The CSS module export map is sorted deliberately so identical sources produce byte-identical client artifacts.