Skip to content
Back to search

dsh-plugin-template

Template for deepseek-harness plugin development.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/bugmaker2--dsh-plugin-template/badge.svg)](/listings/bugmaker2--dsh-plugin-template)

HTML

<a href="/listings/bugmaker2--dsh-plugin-template"><img src="/api/listings/bugmaker2--dsh-plugin-template/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

pnpm install
pnpm run build
dsh plugin --profile web add .

Restart the Web Harness after rebuilding the plugin. A "Greet" tab appears in the session view ring showing `Hello, DSH`.

Remove it with:

dsh plugin --profile web remove dsh-plugin-template

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 116 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # dsh-plugin-template
  2. English | [中文](README.zh.md)
  3. [![dsh.so security](https://www.dsh.so/badge/dsh-plugin-template.svg)](https://www.dsh.so/artifact/dsh-plugin-template)
  4. [![dsh.so install](https://www.dsh.so/badge/install/dsh-plugin-template.svg)](https://www.dsh.so/artifact/dsh-plugin-template)
  5. A complete dual-side [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) plugin template. It demonstrates the full plugin surface — a **host** plugin exposing a Typert Remote, and a **client** plugin mounting that Remote into a React view — with type-checking, linting, unit tests, CI, and publishing metadata wired up.
  6. Out of the box it registers a `greet` Remote: the host composes `"Hello, <name>"` from a configurable prefix, and the client renders the result in a new "Greet" tab.
  7. ## Structure
  8. ```text
  9. package.json # dsh.bundle + dsh.client manifests, scripts, peer deps
  10. cordis.patch.yml # mounts the host plugin row into a profile
  11. dsh.plugin.json # dsh.so registry manifest
  12. src/index.ts # host entry: Config schema + Typert manifest registration
  13. src/runtime.ts # host Remote service (TypertRemoteService)
  14. src/typert.ts # Typert model manifest
  15. src/contract.ts # strict wire contract shared by host and client
  16. src/types.ts # shared host/client types
  17. src/client/index.tsx # client entry: mounts Remote + registers the view slot
  18. src/client/remote.ts # client Remote contribution + typed namespace
  19. src/client/locales.ts # zh / en dictionaries
  20. src/client/view.tsx # minimal React view
  21. src/client/styles.ts # theme-token stylesheet
  22. tests/ # vitest unit tests (contract + runtime)
  23. build.mjs # esbuild dual build (host ESM + client CJS)
  24. .github/workflows/ci.yml
  25. ```
  26. `package.json` is the only manifest Harness needs. `dsh.bundle.patch` makes the package an installable profile bundle; `dsh.client` declares the Web client bundle and the client packages it injects. The host entry is the ordinary Cordis `name`/`apply` export; the client entry is bundled to `lib/client.js` and loaded by the Web harness module loader.
  27. ## Requirements
  28. - Node.js `>= 22.19` (or `>= 24`)
  29. - pnpm `>= 9`
  30. - DeepSeek Harness `>=0.1.0-rc.6`
  31. ## Install from a local checkout
  32. ```sh
  33. pnpm install
  34. pnpm run build
  35. dsh plugin --profile web add .
  36. ```
  37. Restart the Web Harness after rebuilding the plugin. A "Greet" tab appears in the session view ring showing `Hello, DSH`.
  38. Remove it with:
  39. ```sh
  40. dsh plugin --profile web remove dsh-plugin-template
  41. ```
  42. ## Install from Git
  43. ```sh
  44. dsh plugin --profile web add github:you/dsh-plugin-template
  45. ```
  46. A Git install fetches sources, not built artifacts, so pnpm runs the `prepare` script to build `lib/`. pnpm ≥10 blocks that build until you allow it; on the first failed `add`, `dsh` prints the fix — copy the package key it shows into the profile's `pnpm-workspace.yaml`:
  47. ```yaml
  48. allowBuilds:
  49. dsh-plugin-template: true
  50. ```
  51. then re-run the `add`. That allowance lets the package run code at install time, so only allow packages you trust (and pin a commit).
  52. ## Development
  53. ```sh
  54. pnpm run check
  55. ```
  56. `check` runs `typecheck`, `lint`, `test`, and `build`. CI runs the same command after `pnpm install --frozen-lockfile`.
  57. Individual scripts:
  58. ```sh
  59. pnpm run build # esbuild dual bundle + declaration emit
  60. pnpm run typecheck # tsc over src and tests
  61. pnpm run lint # eslint
  62. pnpm run test # vitest
  63. ```
  64. ## Renaming the package
  65. Keep these values in sync when you rename:
  66. - `package.json` → `name`, `exports`, `files`
  67. - `build.mjs` → the `__ModuleLoader__.load` id
  68. - `src/index.ts` → `name`
  69. - `src/client/remote.ts` → package id and the `TypertRemoteNamespace$…` hex of the service key
  70. - `src/client/locales.ts` → locale namespace key
  71. - `src/client/index.tsx` → slot id
  72. - `src/typert.ts` → `package`
  73. - `src/contract.ts` → invocation ids
  74. - `cordis.patch.yml` → `id` and `name`
  75. - `dsh.plugin.json` → `id`
  76. ## Discoverability
  77. Add the GitHub topic [`dsh-plugin`](https://github.com/topics/dsh-plugin) to your fork:
  78. ```sh
  79. gh api --method PUT repos/YOUR-USER/dsh-plugin-template/topics \
  80. -H 'Accept: application/vnd.github+json' \
  81. -f 'names[]=dsh-plugin'
  82. ```
  83. ## License
  84. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.