DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

LWH13345412221 /

LWH13345412221/my-first-plugin

Verified

A minimal DeepSeek Harness plugin that serves /_dsh/hello.

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@83b9a4a5
my-first-plugin

my-first-plugin

一个最小的 DeepSeek Harness 插件示例 · A minimal DeepSeek Harness plugin

dsh-plugin license version

简体中文 · English


简体中文

这是什么

my-first-plugin 是一个最小的 DSH 插件骨架:它只做一件事——在 Web 服务上注册一个 GET /_dsh/hello 路由,返回一行 JSON。用来验证插件从安装到运行整条链路是否打通。

安装

dsh plugin --profile web add github:LWH13345412221/my-first-plugin

然后在 profile 的 cordis.patch.yml 里加上这一行(插件自带 cordis.patch.yml,也可以直接把它 insert 进你的层栈):

- insert:
    - id: my-first-plugin
      name: 'my-first-plugin'

重启 dsh web 后生效。

验证

curl http://127.0.0.1:<web-port>/_dsh/hello

期望返回:

{"ok":true,"value":{"hello":"from my-first-plugin","time":"..."}}

目录结构

my-first-plugin/
├── lib/index.js         # 宿主半侧:注册 /_dsh/hello 路由
├── cordis.patch.yml     # bundle 挂载声明
├── package.json         # 包信息(声明 dsh.bundle)
└── assets/banner.svg    # README 横幅

继续扩展

  • 想加界面:在 package.json 里加 dsh.client.inject 与 dsh.client.platform: "web",并提供 lib/client.js;
  • 想加配置:在 cordis.patch.yml 的 entry 上加 config 字段;
  • 想加接口:在 apply() 里多注册几个 webServer.register 路由。

English

What is this

my-first-plugin is a minimal DSH plugin skeleton. It does exactly one thing: registers a GET /_dsh/hello route on the web server and returns a small JSON payload — enough to prove the whole install-to-runtime path works.

Install

dsh plugin --profile web add github:LWH13345412221/my-first-plugin

Then add the entry to your profile's cordis.patch.yml (the plugin ships its own patch, or insert it into your layer stack):

- insert:
    - id: my-first-plugin
      name: 'my-first-plugin'

Restart dsh web to load it.

Verify

curl http://127.0.0.1:<web-port>/_dsh/hello

Expected:

{"ok":true,"value":{"hello":"from my-first-plugin","time":"..."}}

Layout

my-first-plugin/
├── lib/index.js         # host half: registers the /_dsh/hello route
├── cordis.patch.yml     # bundle mount declaration
├── package.json         # declares dsh.bundle
└── assets/banner.svg    # README banner

Next steps

  • Add a UI: declare dsh.client.inject + dsh.client.platform: "web" and ship lib/client.js;
  • Add config: put a config block on the entry in cordis.patch.yml;
  • Add endpoints: register more webServer.register routes inside apply().

Part of the dsh-plugin ecosystem · MIT License

—/ 5

No ratings yet

Verified DSH bundle

Commit 83b9a4a53701

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout