Skip to content
dsh.fish
Bundle

@lovstudio/dsh-inject-system-prompt

Inject an extra system-prompt section into a DeepSeek Harness agent, shipped as a configurable bundle.

Source
lovstudio
License
MIT
Updated
Updated 3 days ago

Readme

# dsh-inject-system-prompt

Inject an extra system-prompt section into a [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) agent, shipped as a configurable **bundle**.

The plugin registers one section in the harness's system-prompt assembly registry via `ctx.systemPrompt.section()`. Empty `text` drops the section, so the bundle is inert until you configure it.

## Install

Prerequisites: Node.js 22.19+ or 24+, pnpm 11 (`corepack enable` or `npm i -g pnpm`) — `dsh plugin` forwards to pnpm inside the profile directory.

**From a DeepSeek Harness source checkout (recommended — you get the harness source too):**

```sh
git clone --depth 1 --branch dsh-v0.1.2-rc.1 https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness && pnpm install && pnpm run build
pnpm dsh plugin --profile web add -w github:lovstudio/dsh-inject-system-prompt#v0.1.2
pnpm dsh web
```

**Without a checkout (npx; compiled harness only):**

```sh
npx @deepseek-ai/dsh plugin --profile web add -w github:lovstudio/dsh-inject-system-prompt#v0.1.2
npx @deepseek-ai/dsh web
```

`web` is the profile `dsh web` boots. The tag pins a commit whose `lib/` is prebuilt and committed, so nothing is compiled on your machine. Verified on 2026-09-04 against `dsh-v0.1.2-rc.1` in both forms. Remove with `dsh plugin --profile web remove @lovstudio/dsh-inject-system-prompt`.

Then enable the prompt by overriding the row in `$DSH_HOME/profiles/web/cordis.patch.yml` (see [the official publish guide](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md) for layer precedence):

```yaml
- id: inject-system-prompt
  name: '@lovstudio/dsh-inject-system-prompt'
  config:
    text: |
      You are concise and always answer in Simplified Chinese.
```

Start the Web UI:

```sh
dsh web   # alias of dsh --profile web
```

## Local development

`index.js` is both the source and the shipped artifact, so this package needs
no transpilation step. Install it into the isolated development profile with a
link:

```sh
pnpm install
DSH_HOME=/Users/mark/.dsh-lov-dev pnpm --dir /path/to/deepseek-harness dsh plugin --profile web add -w link:/path/to/dsh-inject-system-prompt
```

Editing the linked checkout leaves the Harness repository and the default
`~/.dsh` profile untouched.

## Config

| Key | Default | Meaning |
|---|---|---|
| `text` | `''` | The section text to inject. Empty ⇒ no section. |
| `name` | `injected:prompt` | Section name (must be unique within a scope layer). |
| `order` | `50` | Sort order. Bands: `0` = persona, `100–199` = tool guidance. |
| `complete` | `false` | When true, this section becomes the complete system prompt. |

## Notes

- Requires the `systemPrompt` service, provided by `@deepseek-ai/dsh-base` (the first bundle of every profile). No runtime dependencies.
- Distributed as a bundle (`dsh.bundle.patch` → `cordis.patch.yml`).

## License

[MIT](LICENSE)

Install

dsh plugin --profile web add github:lovstudio/dsh-inject-system-prompt

Profile: web

  • 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.
Source