Skip to main content

deepseek-harness-studio/packages/bundle/base

404Stars43Forks2Issues2Watchers

dsh Shared Core Package: Inserts tools, model adapters, subagent providers, persistence, and policies as a first-layer patch onto the profile root—every profile includes this layer by default.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
ai-agentdeepseekdeepseek-harnessdeepseek-harness-studiodesktop-appdeveloper-toolsdshdsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add @deepseek-ai/dsh-base

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin fufankeji/deepseek-harness-studio/packages/bundle/base for me: review the repository at https://github.com/fufankeji/deepseek-harness-studio first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Positioning

dsh's "shared core" combo package. It doesn't provide runtime APIs itself; its role is to mount all the foundational capabilities needed by every dsh profile to the profile root at once — the default DeepSeek adapter, bash/pwsh tools, filesystem, subagent, permission presets, Settings/Credentials, and Telemetry are all at this layer. Subsequent surface bundles like web/headless are built on top of this layer.

Core Capabilities

  • Inserts ~78 plugin rows at once via a single cordis.patch.yml, forming the shared base for all dsh profiles (cordis.patch.yml:15-451 / tests/base.spec.ts:30-42)
  • Introduces a default model adapter: when not overridden by user settings, equips all Agents with the deepseek-v4-flash model from the deepseek-official provider (cordis.patch.yml:62-68)
  • Provides complementary bash/pwsh shell stacks, with the loader automatically keeping only one based on platform: bash on POSIX, PowerShell on Windows (cordis.patch.yml:178-217 / README.md:7)
  • Offers three-tier permission presets (read-only / workspace-write / danger-full-access), tying the approval service to permission presets; global permission mode can be switched via DSH_PERMISSION_MODE (cordis.patch.yml:170-217)
  • Provides foundational toolset: bash (pwsh), filesystem read/write/search, jobs, web_search (DeepSeek search source), todo, goal, subagent (spawn/fork), str-replace-editor, ralph, skill, workflow (cordis.patch.yml:210-419)
  • Persistence and observability: session to JSONL, attachment images via content-addressed local storage, SQLite index defaults to in-memory mode, Telemetry toggled via DSH_TELEMETRY_MODE environment variable (cordis.patch.yml:98-161)

Technical Implementation

  • Language: TypeScript (ESM), "type": "module", package.json lib/index.js entry only exports export {}
  • Key Dependencies: @deepseek-ai/cordis (Cordis plugin host, peer dependency), @deepseek-ai/cordis-plugin-loader (patch loader), @deepseek-ai/dsh-invariants (peer dependency + invariant companion), ~70 dsh-* workspace packages (forming the 78 plugin rows inserted by the patch)
  • Architecture Pattern: This package "itself" is not a plugin — its package.json attaches a cordis.patch.yml under the dsh.bundle.patch field, which the profile composer inserts as the "first patch layer" into an empty profile root when loading. Addressed by id, subsequent bundle/user profile patches can override these rows. src/invariant.ts is a placeholder-only invariant companion (each inserted row's respective package brings its own invariants)
  • Entry Files: src/index.ts (empty export, module comments only) + src/invariant.ts (base-bundle-invariant companion) + cordis.patch.yml (actual content of the package)

Use Cases

Any developer who wants to "build a dsh profile from scratch" or add a shared base to a profile: installing dsh-base is equivalent to turning on all the shared behaviors by default — DeepSeek adapter, bash/pwsh tools, filesystem, subagent, persistence, telemetry, permission presets — after which web/headless/desktop surface layers only need to stack their own concerned layers on top. Regular users typically don't install this layer directly; instead, they use dsh-cli's built-in or dsh plugin --profile to install surface bundles like web-app and headless, which indirectly use it.

Prerequisites and Compatibility

DependencyMinimum VersionDescription
DSH0.1.0-rc.8Stacked as the "first patch layer" on top of dsh-base; requires dsh CLI of the same major version
Node^22.19.0 || >=24.0.0Declared in repository root engines field; current patch doesn't directly use any Node 22+ APIs, but the inserted row packages follow this line
PlatformmacOS / Linux / WindowsBundle gates bash/pwsh by platform in its own patch, so the same patch loads on all three systems but only mounts one shell stack
Native Modulesnode:sqlite (@deepseek-ai/dsh-session-query-sqlite)Defaults to :memory:; requires process restart to rebuild index; not persisted to disk
CordispeerDependency@deepseek-ai/cordis, provided by the host

Installation

dsh plugin --profile web add github:fufankeji/deepseek-harness-studio/packages/bundle/base

Configuration Options

This bundle doesn't directly expose user configuration — it injects configuration for each mounted row via cordis.patch.yml. Below are the global/behavior-level defaults worth noting:

NameTypeDescriptionDefault Value
sandbox.modeStringFile effect boundary, derived from DSH_PERMISSION_MODE env varworkspace-write
sandbox.workspaceRootPathWorkspace root that restricted subprocesses can write toprocess.cwd()
user-approval.policyStringWhether to prompt before dangerous operationsnever when DSH_PERMISSION_MODE === 'danger-full-access', otherwise ask
bash-sandbox.timeoutMsMillisecondsMax wait time for a single bash command60000
web-search-deepseek.apiKeyEnvEnv Var NameEnv var name for DeepSeek search keyDEEPSEEK_API_KEY
tool-web.searchTimeoutMsMillisecondsSingle web_search timeout60000 (DeepSeek route), others 30000
tool-str-replace-editor.maxOutputCharsNumberMax characters str_replace_editor outputs at once16000
tool-result-pruner thresholdCharactersCharacter threshold for auto-trimming long tool results / keep head / keep tail8192 / 4096 / 1024
repeat-tool-reminder.thresholdsNumber ArrayTurn counts to remind when same tool is called repeatedly[3, 5, 8]
session-telemetry.modeStringOTLP/HTTP reporting mode, derived from DSH_TELEMETRY_MODE; empty = disabledDISABLED
session-telemetry.exporter.urlURLOTLP logs reporting endpoint, overridable by DSH_TELEMETRY_OTLP_URLhttps://harness-telemetry.deepseeksvc.com/v1/logs
session-query-sqlite.openAtStringWhen to open SQLite index; default disables content searchnever
session-query-sqlite.pathStringIndex storage location; :memory: is default:memory:
session-persistence-jsonl.rootPathSession log file root$DSH_HOME/sessions
spill-policy.maxInlineBytesBytesMax size for tool results to be carried inline; beyond this spills to local50000
tool-todo.allowParallelInProgressBooleanWhether todo_write allows multiple in_progress items simultaneouslytrue
tool-ralph.maxRoundsNumberMax iteration rounds for Ralph tool64
tool-fs-search.sampleOverCapGlobResultsBooleanWhether to downsample when glob results exceed capfalse
session-title-llm.targetWords / targetCjkCharactersNumberDefault title length (Western / CJK)5 / 10

Users can also add llm-deepseek: / llm-pi-ai: sections in home's settings.yaml to override the default DeepSeek adapter and activate pi-ai multi-provider; config options outside the patch are not expanded.

FAQ

Q: What is this bundle? Why install it first?

A: dsh's "shared core" combo package. Its cordis.patch.yml mounts all foundational plugins needed by every profile to the profile root at once — LLM adapter, bash/pwsh tools, filesystem, subagent, persistence, telemetry, permission presets all come from this layer. Any dsh profile (web/headless/desktop etc.) defaults to using this layer as the base; without it, you're left with an empty profile.

Q: After installing dsh-base, do I still need the official dsh-cli?

A: No duplication. dsh-base is an in-box bundle in dsh installation. Regular users installing via dsh plugin --profile <name> add typically get surface bundles like web-app and headless; dsh-base is already present by default in @deepseek-ai/dsh production builds.

Q: Does installing dsh-base also enable Codex/Claude Code sub-agents?

A: No. This package explicitly does not include @deepseek-ai/dsh-subagent-codex and @deepseek-ai/dsh-subagent-claude-code. These are optional "product providers" that require installing separate profile bundles to be activated.

Q: I see telemetry behavior after installation. Is it enabled?

A: Disabled by default. While the session-telemetry-otel row is patched in, its mode defaults from the DSH_TELEMETRY_MODE env var; when that variable is empty, it falls to 'DISABLED'. To enable reporting, explicitly set the env var to FULL or FEEDBACK_ONLY (other values still go to disabled branch).

Q: I'm on Windows. Why do bash/pwsh tools behave differently?

A: The bundle gates by platform in its own patch: bash is disabled on win32 via disabled: !!js process.platform === 'win32', pwsh is disabled on non-win32 — same patch, each machine mounts exactly one shell stack. To force bash on Windows requires disabling pwsh-sh/tool-pwsh and re-enabling bash-sh/tool-bash in profile or home cordis.patch.yml simultaneously; missing either causes load failure due to duplicate registration of the same bash service.

Q: I prefer offline local models (or Anthropic/OpenAI/other providers). Do I need to add a provider bundle?

A: Yes. dsh-base has @deepseek-ai/dsh-llm-pi-ai mounted as a "zero-route" provider, but no provider profile is injected. To run pi-ai, fill in provider profiles in home settings.yaml under the llm-pi-ai: section (web surface layer's Models page is the entry point). Without filling this in, only the default DeepSeek adapter appears in the picker.

Q: Does dsh-base have its own runtime API? Can I import its apply() / main entry?

A: No. src/index.ts is an empty export that states "package's substance is cordis.patch.yml". The profile composer parses the patch via the manifest's dsh.bundle.patch field, not through import. src/invariant.ts provides a no-op companion because this package doesn't mount services, emit events, or hold mutable state — each row's respective package brings its own invariants.

Q: Will upgrading dsh-base modify user's home settings.yaml / sessions directory?

A: No. Settings, sessions, .anonymous-user-id, .credentials.yaml are independently managed by their respective services under $DSH_HOME; upgrading dsh-base doesn't touch these locations. session-query-sqlite defaults to :memory:; restarting the process only clears the in-memory search index, leaving disk untouched.

Getting Started Difficulty

Beginner — as long as you know how to use dsh plugin --profile to add bundles and configure keys/provider profiles in home settings.yaml, it works. No need to write Cordis plugins or run loaders. Going deeper requires understanding patch layer override semantics and key constraints.

Known Issues and Limitations

  • Patch replaces entire config rows: Profile overrides must restate every field to preserve on that row; there's no deep merge layer (README.md:19-22 / README.zh.md:19-22)
  • Windows temp directory authorization is per-session private subdirectory — workspace-write restricts writes to workspace and the session's own temp subdirectory (<temp>\dsh-<hash>, restricted subprocess's TMP/TEMP is rewritten); read-only grants no temp directory write permissions (README.md:19-22)
  • Session content search disabled by default — session-query-sqlite.openAt: never keeps precise read, title, and lineage usable, but search calls fail with SESSION_QUERY_SEARCH_DISABLED. To enable, change openAt to first-search or startup in an upper patch layer, typically with a stable path (cordis.patch.yml:111-122 / comments at 109-117)
  • DSH baseline uses full-row replacement, no merging: See cordis.patch.yml file header and README ## Known Limitations and Deferred Work section
  • Telemetry disabled by default but OTLP reporting endpoint still hardcoded to an official domain — session-telemetry-otel.exporter.url defaults to https://harness-telemetry.deepseeksvc.com/v1/logs, overridable via DSH_TELEMETRY_OTLP_URL but defaults to that domain (cordis.patch.yml:148-161)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/fufankeji/deepseek-harness-studio/packages/bundle/base)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory