{"id":30,"date":"2026-10-25T17:33:51","date_gmt":"2026-10-25T09:33:51","guid":{"rendered":"https:\/\/mapleferry.net\/?p=30"},"modified":"2026-10-25T17:33:52","modified_gmt":"2026-10-25T09:33:52","slug":"deepseek-harness-chajiankaifajinjiecong-host-gongjudao-client-ui","status":"publish","type":"post","link":"https:\/\/mapleferry.net\/index.php\/2026\/10\/25\/deepseek-harness-chajiankaifajinjiecong-host-gongjudao-client-ui\/","title":{"rendered":"DeepSeek Harness \u63d2\u4ef6\u5f00\u53d1\u8fdb\u9636\uff1a\u4ece Host \u5de5\u5177\u5230 Client UI"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u5148\u7406\u89e3 DSH \u7684\u63d2\u4ef6\u6a21\u578b<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">DSH \u7684\u63d2\u4ef6\u8fd0\u884c\u65f6\u57fa\u4e8e Cordis\u3002\u4e00\u4e2a\u63d2\u4ef6\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u6a21\u5757\uff0c\u5b83\u5bfc\u51fa\u51e0\u6837\u4e1c\u897f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export const name = 'my-plugin'        \/\/ \u63d2\u4ef6\u540d\nexport const inject = &#91;'tools']        \/\/ \u4f9d\u8d56\u54ea\u4e9b\u670d\u52a1\nexport const Config = Schema.object({})\/\/ \u914d\u7f6e schema\uff08\u53ef\u9009\uff09\nexport function apply(ctx, config) {}  \/\/ \u63d2\u4ef6\u4e3b\u4f53\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u200b<code>inject<\/code>\u200b \u58f0\u660e\u4f9d\u8d56\u7684\u670d\u52a1\uff1bCordis \u4f1a\u5728\u8fd9\u4e9b\u670d\u52a1\u53ef\u7528\u65f6\u8c03\u7528 \u200b<code>apply<\/code>\u200b\uff0c\u5e76\u5728\u63d2\u4ef6\u5378\u8f7d\u6216\u4f9d\u8d56\u6d88\u5931\u65f6\u91ca\u653e\u5b83\u6ce8\u518c\u7684\u8d44\u6e90\u3002\u200b<code>Config<\/code>\u200b \u7528\u4e8e\u6821\u9a8c profile \u914d\u7f6e\u884c\u91cc\u7684 \u200b<code>config<\/code>\u200b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.1 Profile\u3001Bundle \u4e0e Patch<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">DSH \u7684\u8fd0\u884c\u65f6\u7ec4\u5408\u662f\u5206\u5c42\u7684\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DSH \u8fdb\u7a0b\n\u2514\u2500 profile\uff08desktop \/ web \/ headless \/ ...\uff09\n   \u251c\u2500 package.json\n   \u2502  \u2514\u2500 dsh.profile.bundles: &#91;bundle A, bundle B, ...]\n   \u251c\u2500 cordis.patch.yml        # \u7528\u6237\u81ea\u5df1\u7684\u8986\u76d6\u5c42\n   \u2514\u2500 node_modules\/\n      \u251c\u2500 @deepseek-ai\/dsh-base       # \u57fa\u7840 bundle\n      \u251c\u2500 @deepseek-ai\/dsh-web-app    # Web \u5f62\u6001 bundle\n      \u2514\u2500 my-plugin                   # \u4f60\u7684\u63d2\u4ef6\n         \u251c\u2500 cordis.patch.yml         # \u63d2\u4ef6\u8981\u63d2\u5165\u7684\u914d\u7f6e\u884c\n         \u251c\u2500 lib\/index.js             # Host \u4fa7\u5165\u53e3\n         \u2514\u2500 lib\/client.js            # Client \u4fa7\u5165\u53e3\uff08\u53ef\u9009\uff09\n<\/code><\/pre>\n\n\n\n<ul id=\"20261025163433-9jndrdp\" class=\"wp-block-list\">\n<li>\u200b<strong>Bundle<\/strong>\u200b\uff1a\u4e00\u7ec4\u914d\u7f6e\u884c\u7684\u96c6\u5408\uff0c\u901a\u5e38\u662f\u4e00\u4e2a npm \u5305\uff0c\u901a\u8fc7 \u200b<code>dsh.bundle.patch<\/code>\u200b \u6307\u5411\u81ea\u5df1\u7684 \u200b<code>cordis.patch.yml<\/code>\u200b\u3002<\/li>\n\n\n\n<li>\u200b<strong>Patch<\/strong>\u200b\uff1a\u6309 \u200b<code>id<\/code>\u200b \u5b9a\u4f4d\u914d\u7f6e\u884c\uff0c\u53ef\u4ee5\u8986\u76d6\u3001\u7981\u7528\u6216\u63d2\u5165\u3002\u6ce8\u610f\uff0cpatch \u4f1a\u66ff\u6362\u76ee\u6807\u884c\u7684\u6574\u4e2a \u200b<code>config<\/code>\u200b\uff0c\u4e0d\u662f\u6df1\u5408\u5e76\uff1b\u60f3\u4fdd\u7559\u7684\u5b57\u6bb5\u8981\u91cd\u5199\u3002<\/li>\n\n\n\n<li>\u200b<strong>Profile<\/strong>\u200b\uff1a\u628a\u82e5\u5e72 bundle \u6309\u987a\u5e8f\u53e0\u52a0\uff0c\u518d\u53e0\u52a0\u7528\u6237\u81ea\u5df1\u7684 \u200b<code>cordis.patch.yml<\/code>\u200b \u548c \u200b<code>--patch<\/code>\u200b \u8986\u76d6\u5c42\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u52a0\u8f7d\u987a\u5e8f\u5927\u81f4\u662f\uff1abundle \u7684 patch \u2192 profile \u7684 \u200b<code>cordis.patch.yml<\/code>\u200b \u2192 home \u7ea7 patch \u2192 \u200b<code>--patch<\/code>\u200b\u3002\u540e\u5199\u7684\u5c42\u8986\u76d6\u5148\u5199\u7684\u5c42\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.2 Host \u4fa7\u4e0e Client \u4fa7<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u63d2\u4ef6\u53ef\u4ee5\u53ea\u6709\u4e00\u4e2a Host \u4fa7\uff0c\u4e5f\u53ef\u4ee5\u540c\u65f6\u6709 Host \u548c Client \u4e24\u4fa7\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th>Host \u4fa7<\/th><th>Client \u4fa7<\/th><\/tr><\/thead><tbody><tr><td>\u8fd0\u884c\u73af\u5883<\/td><td>Node.js<\/td><td>\u6d4f\u89c8\u5668\u9875\u9762<\/td><\/tr><tr><td>\u5165\u53e3<\/td><td>\u200b<code>main<\/code>\u200b \/ \u200b<code>exports[\".\"]<\/code>\u200b<\/td><td>\u200b<code>exports[\".\/client\"]<\/code>\u200b<\/td><\/tr><tr><td>\u80fd\u505a\u4ec0\u4e48<\/td><td>\u5de5\u5177\u3001\u547d\u4ee4\u3001\u670d\u52a1\u3001\u4f1a\u8bdd\u6295\u5f71\u3001\u6a21\u578b\u63d0\u4f9b\u65b9\u3001\u6587\u4ef6\/\u7f51\u7edc\u8bbf\u95ee<\/td><td>\u9875\u9762\u3001\u9762\u677f\u3001\u8bbe\u7f6e\u5361\u7247\u3001\u804a\u5929\u533a\u57df\u6269\u5c55<\/td><\/tr><tr><td>\u4e0d\u80fd\u505a\u4ec0\u4e48<\/td><td>\u4e0d\u80fd\u76f4\u63a5\u753b UI<\/td><td>\u4e0d\u80fd\u76f4\u63a5\u8bfb\u6587\u4ef6\u3001\u8dd1\u8fdb\u7a0b\u3001\u8bbf\u95ee Node API<\/td><\/tr><tr><td>\u4f9d\u8d56\u58f0\u660e<\/td><td>\u200b<code>peerDependencies<\/code>\u200b<\/td><td>\u200b<code>dsh.client.inject<\/code>\u200b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e24\u4fa7\u901a\u8fc7\u8fdc\u7a0b\u8c03\u7528\uff08Typert\uff09\u901a\u4fe1\u3002\u4e0d\u8981\u4e3a\u4e86\u7701\u4e8b\u628a Host \u7684\u6587\u4ef6\u8bfb\u53d6\u903b\u8f91\u585e\u8fdb Client\uff1b\u6d4f\u89c8\u5668\u4fa7\u62ff\u4e0d\u5230 Node \u80fd\u529b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1.3 \u5e38\u89c1\u6269\u5c55\u70b9<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6269\u5c55\u70b9<\/th><th>\u670d\u52a1<\/th><th>\u5178\u578b\u7528\u9014<\/th><\/tr><\/thead><tbody><tr><td>\u5de5\u5177<\/td><td>\u200b<code>ctx.tools<\/code>\u200b<\/td><td>\u8ba9\u6a21\u578b\u8c03\u7528\u65b0\u80fd\u529b<\/td><\/tr><tr><td>\u659c\u6760\u547d\u4ee4<\/td><td>\u200b<code>ctx.commands<\/code>\u200b<\/td><td>\u7528\u6237\u76f4\u63a5\u89e6\u53d1\u3001\u4e0d\u7ecf\u8fc7\u6a21\u578b<\/td><\/tr><tr><td>UI \u63d2\u69fd<\/td><td>\u200b<code>ctx.slots<\/code>\u200b<\/td><td>\u65b0\u589e\u9875\u9762\u3001\u9762\u677f\u3001\u6807\u7b7e\u9875\u3001\u8bbe\u7f6e\u5361\u7247<\/td><\/tr><tr><td>\u4f1a\u8bdd\u6295\u5f71<\/td><td>\u200b<code>ctx.sessionProjections<\/code>\u200b<\/td><td>\u628a\u4e8b\u4ef6\u6d41\u6295\u5f71\u6210 UI \u53ef\u8bfb\u72b6\u6001<\/td><\/tr><tr><td>\u8bbe\u7f6e\u8868\u5355<\/td><td>\u200b<code>ctx.configForms<\/code>\u200b<\/td><td>\u63d2\u4ef6\u8be6\u60c5\u9875\u7684\u914d\u7f6e\u5361\u7247<\/td><\/tr><tr><td>\u8fdc\u7a0b\u8c03\u7528<\/td><td>\u200b<code>ctx.typert<\/code>\u200b<\/td><td>Host \u4e0e Client \u4e4b\u95f4\u7684\u7c7b\u578b\u5316 RPC<\/td><\/tr><tr><td>\u6a21\u578b\u63d0\u4f9b\u65b9<\/td><td>\u200b<code>ctx.llm<\/code>\u200b<\/td><td>\u6ce8\u518c\u65b0\u7684\u6a21\u578b\u8def\u7531\uff08\u8fdb\u9636\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u51c6\u5907\u5f00\u53d1\u73af\u5883<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u524d\u7f6e\u6761\u4ef6<\/strong><\/h3>\n\n\n\n<ul id=\"20261025163433-zml5war\" class=\"wp-block-list\">\n<li>Node.js \u200b<code>^22.19.0<\/code>\u200b \u6216 \u200b<code>>=24.0.0<\/code>\u200b\u3002<\/li>\n\n\n\n<li>pnpm\u3002<\/li>\n\n\n\n<li>\u4e00\u4e2a\u53ef\u8fd0\u884c\u7684 DSH\u3002\u5f00\u53d1\u9636\u6bb5\u5efa\u8bae\u7528 \u200b<code>web<\/code>\u200b profile\uff0c\u800c\u4e0d\u662f\u684c\u9762\u7aef\u6301\u6709\u7684 \u200b<code>desktop<\/code>\u200b profile\u3002<\/li>\n\n\n\n<li>TypeScript \u548c React \u57fa\u7840\u3002Host \u4fa7\u53ef\u4ee5\u4e0d\u7528 React\uff0cClient \u4fa7\u9700\u8981\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>node --version\npnpm --version\ndsh --version\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u7248\u672c\u5bf9\u9f50<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u63d2\u4ef6\u4f1a import DSH \u7684\u5305\uff0c\u4f8b\u5982 \u200b<code>@deepseek-ai\/cordis<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/dsh-tools<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/schemastery<\/code>\u200b\u3002\u8fd9\u4e9b\u5305\u5728\u8fd0\u884c\u65f6\u7531 DSH profile \u63d0\u4f9b\uff0c\u5728\u5f00\u53d1\u65f6\u4f5c\u4e3a \u200b<code>peerDependencies<\/code>\u200b \/ \u200b<code>devDependencies<\/code>\u200b \u5b89\u88c5\uff0c\u7528\u6765\u505a\u7c7b\u578b\u68c0\u67e5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u539f\u5219\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-g8axise\" class=\"wp-block-list\">\n<li>\u63d2\u4ef6\u7684 peer \u8303\u56f4\u548c\u5f53\u524d DSH \u7248\u672c\u5bf9\u9f50\u3002<\/li>\n\n\n\n<li>\u4e0d\u8981\u5728\u4e00\u4e2a\u63d2\u4ef6\u91cc\u6346\u7ed1\u53e6\u4e00\u4efd \u200b<code>@deepseek-ai\/cordis<\/code>\u200b\uff0c\u5426\u5219\u53ef\u80fd\u51fa\u73b0\u4e24\u4e2a\u670d\u52a1\u5bb9\u5668\u3002<\/li>\n\n\n\n<li>\u5347\u7ea7 DSH \u540e\uff0c\u91cd\u65b0\u8dd1\u7c7b\u578b\u68c0\u67e5\u548c\u4e00\u6b21\u771f\u5b9e\u5b89\u88c5\u6d4b\u8bd5\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 \u5efa\u4e00\u4e2a\u72ec\u7acb\u76ee\u5f55<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u628a\u63d2\u4ef6\u6e90\u7801\u76f4\u63a5\u653e\u8fdb \u200b<code>~\/.dsh\/profiles\/web<\/code>\u200b\u3002\u5728\u9879\u76ee\u76ee\u5f55\u91cc\u5f00\u53d1\uff0c\u518d\u901a\u8fc7\u672c\u5730\u8def\u5f84\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dsh-plugin-hello\/\n\u251c\u2500 package.json\n\u251c\u2500 cordis.patch.yml\n\u251c\u2500 README.md\n\u251c\u2500 tsconfig.json\n\u251c\u2500 tsdown.config.ts\n\u251c\u2500 tsdown.client.config.ts\n\u2514\u2500 src\/\n   \u251c\u2500 index.ts\n   \u2514\u2500 client.tsx\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u6700\u5c0f\u53ef\u7528\uff1a\u4e00\u4e2a Host \u5de5\u5177\u63d2\u4ef6<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e2a\u4f8b\u5b50\u6ce8\u518c\u4e00\u4e2a \u200b<code>hello_greet<\/code>\u200b \u5de5\u5177\u3001\u4e00\u4e2a \u200b<code>\/hello<\/code>\u200b \u547d\u4ee4\uff0c\u5e76\u5728\u4f1a\u8bdd\u91cc\u589e\u52a0\u4e00\u4e2a\u6807\u7b7e\u9875\u3002\u5148\u5b8c\u6210 Host \u4fa7\uff0c\u518d\u8865 Client \u4fa7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 package.json<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"name\": \"dsh-plugin-hello\",\n  \"version\": \"0.1.0\",\n  \"description\": \"A minimal DeepSeek Harness plugin with one tool, one command and one conversation tab.\",\n  \"type\": \"module\",\n  \"main\": \"lib\/index.js\",\n  \"exports\": {\n    \".\": \".\/lib\/index.js\",\n    \".\/client\": \".\/lib\/client.js\",\n    \".\/package.json\": \".\/package.json\"\n  },\n  \"files\": &#91;\n    \"lib\",\n    \"cordis.patch.yml\",\n    \"README.md\"\n  ],\n  \"keywords\": &#91;\n    \"dsh-plugin\",\n    \"deepseek-harness\",\n    \"dsh\"\n  ],\n  \"license\": \"MIT\",\n  \"engines\": {\n    \"node\": \"^22.19.0 || &gt;=24.0.0\",\n    \"dsh\": \"&gt;=0.1.5-rc.3\"\n  },\n  \"dsh\": {\n    \"bundle\": {\n      \"patch\": \".\/cordis.patch.yml\"\n    },\n    \"client\": {\n      \"inject\": &#91;\n        \"@deepseek-ai\/dsh-client-ui-conversation\"\n      ],\n      \"platform\": \"web\"\n    }\n  },\n  \"peerDependencies\": {\n    \"@deepseek-ai\/cordis\": \"^4.0.2\",\n    \"@deepseek-ai\/dsh-tools\": \"&gt;=0.1.5-rc.3\",\n    \"@deepseek-ai\/schemastery\": \"^3.18.2\",\n    \"react\": \"^18.3.1\"\n  },\n  \"devDependencies\": {\n    \"@deepseek-ai\/cordis\": \"^4.0.2\",\n    \"@deepseek-ai\/dsh-tools\": \"0.1.5-rc.3\",\n    \"@deepseek-ai\/schemastery\": \"^3.18.2\",\n    \"@types\/node\": \"^22.9.0\",\n    \"@types\/react\": \"^18.3.31\",\n    \"react\": \"^18.3.1\",\n    \"tsdown\": \"^0.22.2\",\n    \"typescript\": \"^5.6.3\"\n  },\n  \"scripts\": {\n    \"build\": \"tsdown &amp;&amp; tsdown -c tsdown.client.config.ts\",\n    \"typecheck\": \"tsc --noEmit\"\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u51e0\u4e2a\u5b57\u6bb5\u7684\u4f5c\u7528\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-zkwrn0s\" class=\"wp-block-list\">\n<li>\u200b<code>dsh.bundle.patch<\/code>\u200b\uff1a\u544a\u8bc9 DSH \u8fd9\u4e2a\u5305\u7684\u7ec4\u5408\u8865\u4e01\u5728\u54ea\u91cc\u3002<\/li>\n\n\n\n<li>\u200b<code>dsh.client<\/code>\u200b\uff1a\u58f0\u660e\u5b58\u5728 Client \u4fa7\u5165\u53e3\uff1b\u200b<code>inject<\/code>\u200b \u662f\u5ba2\u6237\u7aef\u4f9d\u8d56\u7684\u6a21\u5757\uff0c\u200b<code>platform<\/code>\u200b \u76ee\u524d\u662f \u200b<code>web<\/code>\u200b\u3002<\/li>\n\n\n\n<li>\u200b<code>exports[\".\/client\"]<\/code>\u200b\uff1aClient \u4fa7\u7684\u52a0\u8f7d\u5165\u53e3\uff0c\u6587\u4ef6\u540d\u548c\u6784\u5efa\u4ea7\u7269\u8981\u4e00\u81f4\u3002<\/li>\n\n\n\n<li>\u200b<code>keywords<\/code>\u200b\uff1a\u200b<code>dsh-plugin<\/code>\u200b \u548c \u200b<code>deepseek-harness<\/code>\u200b \u662f\u63d2\u4ef6\u5e02\u573a\u53d1\u73b0\u63d2\u4ef6\u7684\u5173\u952e\u8bcd\u3002<\/li>\n\n\n\n<li>\u200b<code>engines.dsh<\/code>\u200b\uff1a\u58f0\u660e\u6d4b\u8bd5\u8fc7\u7684 DSH \u8303\u56f4\uff0c\u4fbf\u4e8e\u7528\u6237\u5224\u65ad\u517c\u5bb9\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 cordis.patch.yml<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>- insert:\n    - id: hello\n      name: 'dsh-plugin-hello'\n      config:\n        greeting: \u4f60\u597d\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u200b<code>insert<\/code>\u200b \u4f1a\u5411\u5f53\u524d profile \u63d2\u5165\u4e00\u884c\u63d2\u4ef6\u914d\u7f6e\u3002\u200b<code>id<\/code>\u200b \u5728\u540c\u4e00 profile \u4e2d\u5e94\u552f\u4e00\uff1b\u200b<code>name<\/code>\u200b \u662f\u5305\u540d\uff1b\u200b<code>config<\/code>\u200b \u4f1a\u4f20\u7ed9 \u200b<code>apply<\/code>\u200b \u7684\u7b2c\u4e8c\u4e2a\u53c2\u6570\uff0c\u5e76\u5148\u7ecf\u8fc7 \u200b<code>Config<\/code>\u200b \u6821\u9a8c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 Host \u5165\u53e3<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import type { Context } from '@deepseek-ai\/cordis'\nimport { defineTool } from '@deepseek-ai\/dsh-tools'\nimport Schema from '@deepseek-ai\/schemastery'\n\nexport const name = 'dsh-plugin-hello'\nexport const inject = &#91;'tools', 'commands']\n\nexport const Config = Schema.object({\n  greeting: Schema.string().default('\u4f60\u597d'),\n})\n\nexport function apply(ctx: Context, config: { greeting: string }) {\n  ctx.tools.register(defineTool({\n    name: 'hello_greet',\n    description: 'Return a short greeting for a person. Use when the user asks for a greeting demo.',\n    parameters: {\n      name: {\n        type: 'string',\n        required: true,\n        description: 'Name to greet',\n      },\n    },\n    output: {\n      schema: { type: 'string' },\n      render: (_args, value) =&gt; &#91;{ type: 'text', text: value }],\n    },\n    async execute(args, exec) {\n      exec.signal.throwIfAborted()\n      return `${config.greeting}\uff0c${args.name}\uff01`\n    },\n  }))\n\n  ctx.commands.register({\n    name: 'hello',\n    description: 'Print a greeting without calling the model',\n    input: { hint: '&lt;name&gt;' },\n    handler: ({ rawInput }) =&gt; ({\n      kind: 'success',\n      text: `${config.greeting}\uff0c${rawInput.trim() || '\u4e16\u754c'}\uff01`,\n    }),\n  })\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9010\u6bb5\u8bf4\u660e\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-7tzh34w\" class=\"wp-block-list\">\n<li>\u200b<code>name<\/code>\u200b\uff1a\u63d2\u4ef6\u6807\u8bc6\uff0c\u548c\u5305\u540d\u4fdd\u6301\u4e00\u81f4\u6700\u7701\u5fc3\u3002<\/li>\n\n\n\n<li>\u200b<code>inject<\/code>\u200b\uff1a\u58f0\u660e\u4f9d\u8d56 \u200b<code>tools<\/code>\u200b \u548c \u200b<code>commands<\/code>\u200b \u4e24\u4e2a\u670d\u52a1\u3002\u7f3a\u5c11\u8fd9\u4e9b\u670d\u52a1\u7684 profile \u4f1a\u4e00\u76f4\u7b49\u5f85\u4f9d\u8d56\uff0c\u200b<code>apply<\/code>\u200b \u4e0d\u4f1a\u6267\u884c\uff1b\u5982\u679c\u53ea\u662f\u60f3\u5728\u65e0\u5934\u73af\u5883\u4f7f\u7528\u5de5\u5177\uff0c\u53ef\u4ee5\u53bb\u6389 \u200b<code>commands<\/code>\u200b \u4f9d\u8d56\u3002<\/li>\n\n\n\n<li>\u200b<code>Config<\/code>\u200b\uff1aCordis \u7528\u5b83\u6821\u9a8c\u914d\u7f6e\u884c\u3002\u200b<code>greeting<\/code>\u200b \u6709\u9ed8\u8ba4\u503c\uff0c\u6240\u4ee5 patch \u91cc\u4e0d\u5199\u4e5f\u80fd\u542f\u52a8\u3002<\/li>\n\n\n\n<li>\u200b<code>apply<\/code>\u200b\uff1a\u63d2\u4ef6\u4e3b\u4f53\u3002\u200b<code>ctx.tools.register<\/code>\u200b \u548c \u200b<code>ctx.commands.register<\/code>\u200b \u6ce8\u518c\u7684\u8d44\u6e90\u4f1a\u968f\u63d2\u4ef6\u5378\u8f7d\u81ea\u52a8\u91ca\u653e\u3002<\/li>\n\n\n\n<li>\u200b<code>defineTool<\/code>\u200b\uff1a\u58f0\u660e\u5de5\u5177\u540d\u3001\u63cf\u8ff0\u3001\u53c2\u6570 schema\u3001\u8f93\u51fa schema \u548c \u200b<code>execute<\/code>\u200b\u3002\u53c2\u6570\u5728\u6267\u884c\u524d\u4f1a\u88ab\u6821\u9a8c\uff0c\u975e\u6cd5\u8f93\u5165\u53d8\u6210\u666e\u901a\u7684\u5de5\u5177\u9519\u8bef\uff0c\u800c\u4e0d\u662f\u8ba9\u6574\u8f6e\u5bf9\u8bdd\u5d29\u6e83\u3002<\/li>\n\n\n\n<li>\u200b<code>output.render<\/code>\u200b\uff1a\u628a\u8fd4\u56de\u503c\u6e32\u67d3\u6210\u6a21\u578b\u53ef\u8bfb\u7684\u5185\u5bb9\u5757\u3002\u8fd9\u91cc\u8fd4\u56de\u7eaf\u6587\u672c\uff0c\u6240\u4ee5\u7528 \u200b<code>text<\/code>\u200b \u5757\u3002<\/li>\n\n\n\n<li>\u200b<code>exec.signal<\/code>\u200b\uff1a\u8c03\u7528\u65b9\u7684\u53d6\u6d88\u4fe1\u53f7\u3002\u5de5\u5177\u5e94\u5c3d\u91cf\u5728\u8017\u65f6\u64cd\u4f5c\u524d\u68c0\u67e5\u5b83\uff0c\u5e76\u628a\u4fe1\u53f7\u4f20\u7ed9 \u200b<code>fetch<\/code>\u200b\u3001\u200b<code>readFile<\/code>\u200b \u7b49\u652f\u6301\u53d6\u6d88\u7684 API\u3002<\/li>\n\n\n\n<li>\u200b<code>ctx.commands.register<\/code>\u200b\uff1a\u6ce8\u518c \u200b<code>\/hello<\/code>\u200b\u3002\u547d\u4ee4\u76f4\u63a5\u5bf9 Agent \u6267\u884c\uff0c\u4e0d\u4f1a\u4ea7\u751f\u6a21\u578b\u6d88\u606f\uff1b\u200b<code>handler<\/code>\u200b \u8fd4\u56de \u200b<code>success<\/code>\u200b \u6216 \u200b<code>error<\/code>\u200b\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u5c0f\u770b\u5de5\u5177\u7684 \u200b<code>description<\/code>\u200b\u3002\u6a21\u578b\u662f\u6839\u636e\u540d\u79f0\u3001\u63cf\u8ff0\u548c\u53c2\u6570 schema \u9009\u62e9\u5de5\u5177\u7684\uff1b\u63cf\u8ff0\u5199\u6e05\u695a\u300c\u4ec0\u4e48\u65f6\u5019\u7528\u3001\u8fd4\u56de\u4ec0\u4e48\u300d\uff0c\u6bd4\u5806\u5f88\u591a\u540c\u4e49\u5de5\u5177\u66f4\u6709\u6548\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.4 \u7c7b\u578b\u68c0\u67e5\u4e0e\u6784\u5efa<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u200b<code>tsconfig.json<\/code>\u200b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"ESNext\",\n    \"moduleResolution\": \"Bundler\",\n    \"jsx\": \"react-jsx\",\n    \"strict\": true,\n    \"skipLibCheck\": true,\n    \"noEmit\": true,\n    \"types\": &#91;\"node\"]\n  },\n  \"include\": &#91;\n    \"src\",\n    \"tsdown.config.ts\",\n    \"tsdown.client.config.ts\"\n  ]\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Host \u6784\u5efa\u914d\u7f6e \u200b<code>tsdown.config.ts<\/code>\u200b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { defineConfig } from 'tsdown'\n\nexport default defineConfig({\n  entry: &#91;'src\/index.ts'],\n  format: &#91;'esm'],\n  outDir: 'lib',\n  dts: true,\n  external: &#91;\/^@deepseek-ai\\\/\/],\n})\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Client \u6784\u5efa\u914d\u7f6e \u200b<code>tsdown.client.config.ts<\/code>\u200b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import { defineConfig } from 'tsdown'\n\nexport default defineConfig({\n  entry: &#91;'src\/client.tsx'],\n  format: &#91;'esm'],\n  outDir: 'lib',\n  clean: false,\n  external: &#91;\n    'react',\n    'react-dom',\n    'react\/jsx-runtime',\n    \/^@deepseek-ai\\\/\/,\n  ],\n})\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5ba2\u6237\u7aef\u6784\u5efa\u4f7f\u7528 \u200b<code>clean: false<\/code>\u200b\uff0c\u56e0\u4e3a\u4e24\u4e2a\u6784\u5efa\u5171\u7528 \u200b<code>lib\/<\/code>\u200b\uff1b\u5426\u5219\u7b2c\u4e8c\u6b21\u6784\u5efa\u53ef\u80fd\u6e05\u6389 Host \u4ea7\u7269\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u4f9d\u8d56\u5e76\u6784\u5efa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pnpm install\npnpm typecheck\npnpm build\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6784\u5efa\u540e\u5e94\u5f97\u5230 \u200b<code>lib\/index.js<\/code>\u200b \u548c \u200b<code>lib\/client.js<\/code>\u200b\u3002\u5982\u679c\u53ea\u505a Host \u4fa7\uff0c\u53ef\u4ee5\u6682\u65f6\u53bb\u6389 \u200b<code>dsh.client<\/code>\u200b\u3001\u200b<code>exports[\".\/client\"]<\/code>\u200b \u548c \u200b<code>src\/client.tsx<\/code>\u200b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.5 \u672c\u5730\u5b89\u88c5\u5e76\u9a8c\u8bc1<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u7528 \u200b<code>web<\/code>\u200b profile \u5b89\u88c5\u672c\u5730\u76ee\u5f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dsh plugin --profile web add E:\\code\\dsh-plugin-hello\ndsh plugin --profile web list --depth 0\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u68c0\u67e5 profile \u7684\u7ec4\u5408\u6e05\u5355\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Get-Content \"$env:USERPROFILE\\.dsh\\profiles\\web\\package.json\"\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u786e\u8ba4 \u200b<code>dsh.profile.bundles<\/code>\u200b \u91cc\u51fa\u73b0\u4e86 \u200b<code>dsh-plugin-hello<\/code>\u200b\u3002\u7136\u540e\u542f\u52a8 Web\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dsh --profile web --no-open --port 8080\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6253\u5f00\u7ec8\u7aef\u6253\u5370\u7684 URL\uff0c\u5728\u5bf9\u8bdd\u91cc\u8bf4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u8bf7\u8c03\u7528 hello_greet \u5de5\u5177\uff0c\u5411\u5f20\u4e09\u95ee\u597d\u3002\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/hello \u5f20\u4e09\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e24\u8005\u7684\u533a\u522b\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-54w9ljo\" class=\"wp-block-list\">\n<li>\u5de5\u5177\u8c03\u7528\u4f1a\u7ecf\u8fc7\u6a21\u578b\uff1a\u6a21\u578b\u51b3\u5b9a\u662f\u5426\u8c03\u7528\u3001\u4f20\u4ec0\u4e48\u53c2\u6570\u3002<\/li>\n\n\n\n<li>\u200b<code>\/hello<\/code>\u200b \u662f\u547d\u4ee4\uff1a\u4e0d\u4ea7\u751f\u6a21\u578b\u6d88\u606f\uff0c\u76f4\u63a5\u7531 Host \u6267\u884c\u5e76\u8fd4\u56de\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u5de5\u5177\u6ca1\u6709\u51fa\u73b0\uff0c\u5148\u770b\u914d\u7f6e\u6811\u662f\u5426\u771f\u7684\u5305\u542b\u63d2\u4ef6\u884c\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">powershell<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dsh --profile web --dump-config\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u518d\u68c0\u67e5 \u200b<code>~\/.dsh\/logs<\/code>\u200b \u548c profile \u4e0b\u7684 \u200b<code>.plugin-manager\/logs<\/code>\u200b\u3002\u65b0\u589e bundle \u4e0d\u662f\u70ed\u52a0\u8f7d\uff0c\u5b89\u88c5\u540e\u5fc5\u987b\u91cd\u542f profile\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001Client \u4fa7\uff1a\u7ed9\u4f1a\u8bdd\u52a0\u4e00\u4e2a\u6807\u7b7e\u9875<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.1 \u5ba2\u6237\u7aef\u5165\u53e3<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import type { Context } from '@deepseek-ai\/cordis'\n\nexport const name = 'dsh-plugin-hello'\nexport const inject = &#91;'slots']\n\nexport function apply(ctx: Context) {\n  ctx.slots.inject('conversation.view', () =&gt;\n    ctx.slots.register(\n      {\n        name: 'conversation.view',\n        id: 'hello',\n        order: 50,\n        label: () =&gt; 'Hello',\n      },\n      () =&gt; (\n        &lt;div style={{ padding: 24 }}&gt;\n          &lt;h3 style={{ margin: '0 0 8px' }}&gt;Hello from dsh-plugin-hello&lt;\/h3&gt;\n          &lt;p style={{ margin: 0, opacity: 0.75 }}&gt;\n            \u8fd9\u4e2a\u9762\u677f\u7531\u63d2\u4ef6\u7684\u5ba2\u6237\u7aef\u5165\u53e3\u6ce8\u518c\u3002\n          &lt;\/p&gt;\n        &lt;\/div&gt;\n      ),\n    ),\n  )\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6bb5\u4ee3\u7801\u505a\u4e86\u4e09\u4ef6\u4e8b\uff1a<\/p>\n\n\n\n<ol id=\"20261025163433-ybhijvy\" class=\"wp-block-list\">\n<li>\u58f0\u660e\u4f9d\u8d56 \u200b<code>slots<\/code>\u200b \u670d\u52a1\u3002<\/li>\n\n\n\n<li>\u200b<code>ctx.slots.inject('conversation.view', ...)<\/code>\u200b \u7b49\u5f85\u5bbf\u4e3b\u6ce8\u518c\u8fd9\u4e2a\u63d2\u69fd\u3002<\/li>\n\n\n\n<li>\u5728\u63d2\u69fd\u51fa\u73b0\u540e\uff0c\u7528 \u200b<code>ctx.slots.register<\/code>\u200b \u6ce8\u518c\u4e00\u4e2a\u6807\u7b7e\u9875\u3002\u200b<code>id<\/code>\u200b \u5fc5\u987b\u552f\u4e00\uff0c\u200b<code>order<\/code>\u200b \u63a7\u5236\u987a\u5e8f\uff0c\u200b<code>label<\/code>\u200b \u662f\u6807\u7b7e\u6587\u672c\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u63d2\u69fd\u540d\u79f0\u3001\u53ef\u7528\u53c2\u6570\u548c\u751f\u547d\u5468\u671f\u7531\u5bbf\u4e3b UI \u51b3\u5b9a\u3002\u4e0d\u540c DSH \u7248\u672c\u53ef\u80fd\u65b0\u589e\u6216\u8c03\u6574\u63d2\u69fd\uff1b\u5199\u63d2\u4ef6\u65f6\u5e94\u4ee5\u5bf9\u5e94 UI \u5305\u7684 README\/\u7c7b\u578b\u4e3a\u51c6\uff0c\u4e0d\u8981\u51ed\u731c\u6d4b\u4f7f\u7528\u5185\u90e8\u63d2\u69fd\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.2 \u6784\u5efa\u4e0e\u52a0\u8f7d<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6784\u5efa\u540e\u786e\u8ba4 \u200b<code>lib\/client.js<\/code>\u200b \u5b58\u5728\uff0c\u7136\u540e\u91cd\u542f profile \u5e76\u5237\u65b0\u9875\u9762\u3002Client \u4fa7\u53d8\u66f4\u901a\u5e38\u4e0d\u4f1a\u88ab\u5df2\u7ecf\u6253\u5f00\u7684\u9875\u9762\u81ea\u52a8\u62fe\u53d6\uff1b\u5f00\u53d1\u65f6\u53ef\u4ee5\u8ba9\u6784\u5efa\u8fdb\u7a0b watch\uff0c\u7136\u540e\u91cd\u542f\/\u5237\u65b0\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u4f60\u5728 DSH \u6e90\u7801\u4ed3\u5e93\u5185\u5f00\u53d1\uff0c\u5e76\u4e14\u540c\u65f6\u8fd0\u884c\u4e86 \u200b<code>pnpm run dev:web<\/code>\u200b\uff0c\u5ba2\u6237\u7aef\u63d2\u4ef6\u53ef\u4ee5\u5229\u7528 HMR \u91cd\u8f7d\uff1b\u7b2c\u4e09\u65b9\u63d2\u4ef6\u5b89\u88c5\u5728 profile \u91cc\u65f6\uff0c\u4e0d\u8981\u5047\u8bbe\u4e00\u5b9a\u6709\u540c\u6837\u7684\u70ed\u66f4\u65b0\u4f53\u9a8c\uff0c\u6309\u300c\u91cd\u65b0\u6784\u5efa \u2192 \u91cd\u542f \u2192 \u5237\u65b0\u300d\u7684\u7a33\u59a5\u6d41\u7a0b\u9a8c\u8bc1\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.3 \u63d2\u69fd\u4e0e\u72b6\u6001<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e00\u4e2a\u5e38\u89c1\u7684\u8bef\u533a\u662f\u300cClient \u4fa7\u76f4\u63a5\u8bfb\u6587\u4ef6\u3001\u53d1\u7f51\u7edc\u8bf7\u6c42\u300d\u3002\u8fd9\u4f1a\u7ed5\u8fc7 Host \u7684\u6743\u9650\u548c\u5ba1\u8ba1\uff0c\u4e5f\u4e0d\u5229\u4e8e\u8de8\u7aef\u517c\u5bb9\u3002\u6b63\u786e\u505a\u6cd5\u662f\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-py00d4b\" class=\"wp-block-list\">\n<li>Client \u53ea\u8d1f\u8d23\u5c55\u793a\u548c\u4ea4\u4e92\u3002<\/li>\n\n\n\n<li>\u9700\u8981\u6570\u636e\u65f6\uff0c\u901a\u8fc7 Host \u66b4\u9732\u7684 Remote \u65b9\u6cd5\u83b7\u53d6\u3002<\/li>\n\n\n\n<li>\u9700\u8981\u5199\u5165\u65f6\uff0c\u540c\u6837\u8d70 Host \u670d\u52a1\uff0c\u8ba9\u6587\u4ef6\u7b56\u7565\u548c\u5ba1\u6279\u751f\u6548\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u53ea\u662f\u505a\u4e00\u4e2a\u9759\u6001\u8bf4\u660e\u9875\uff0c\u53ef\u4ee5\u5b8c\u5168\u4e0d\u8bf7\u6c42 Host\uff1b\u4e00\u65e6\u6d89\u53ca\u4f1a\u8bdd\u3001\u6587\u4ef6\u3001\u8bbe\u7f6e\u6216\u51ed\u636e\uff0c\u5c31\u5e94\u8be5\u8d70\u670d\u52a1\u5c42\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4.4 \u63d2\u4ef6\u8be6\u60c5\u9875\u7684\u914d\u7f6e\u5361\u7247<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u63d2\u4ef6\u9700\u8981\u56fe\u5f62\u5316\u914d\u7f6e\uff0c\u53ef\u4ee5\u6ce8\u5165 \u200b<code>configForms<\/code>\u200b \u670d\u52a1\uff0c\u5e76\u5728 \u200b<code>plugins.bundle.config<\/code>\u200b \u63d2\u69fd\u6ce8\u518c\u5361\u7247\u3002\u200b<code>dsh-context<\/code>\u200b \u7684\u5ba2\u6237\u7aef\u5165\u53e3\u5c31\u662f\u4e00\u4e2a\u5b8c\u6574\u8303\u4f8b\uff1a\u5b83\u901a\u8fc7 \u200b<code>configForms.whileServed([...])<\/code>\u200b \u7b49\u5f85\u63d2\u4ef6\u914d\u7f6e\u53ef\u7528\uff0c\u7136\u540e\u6ce8\u518c\u5361\u7247\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u90e8\u5206\u4f9d\u8d56\u8f83\u65b0\u7684\u8bbe\u7f6e\u670d\u52a1\uff0c\u5efa\u8bae\u5148\u8bfb \u200b<code>@deepseek-ai\/dsh-client-ui-settings<\/code>\u200b \u548c \u200b<code>@deepseek-ai\/dsh-client-ui-settings-plugin-inventory<\/code>\u200b \u7684 README\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u4f7f\u7528\u3002\u7b80\u5355\u7684\u63d2\u4ef6\u53ef\u4ee5\u5148\u53ea\u63d0\u4f9b \u200b<code>cordis.patch.yml<\/code>\u200b \u914d\u7f6e\uff0c\u7b49\u7a33\u5b9a\u540e\u518d\u505a UI\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e94\u3001Host \u4e0e Client \u4e4b\u95f4\uff1aTypert RPC<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.1 \u4e3a\u4ec0\u4e48\u9700\u8981\u5b83<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Client \u4fa7\u8fd0\u884c\u5728\u6d4f\u89c8\u5668\u91cc\uff0c\u4e0d\u80fd\u76f4\u63a5\u8c03\u7528 Node \u670d\u52a1\u3002DSH \u7528 Typert \u505a\u7c7b\u578b\u5316\u8fdc\u7a0b\u8c03\u7528\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-qb741ju\" class=\"wp-block-list\">\n<li>Host \u4fa7\u58f0\u660e\u4e00\u4e2a Remote \u670d\u52a1\u548c\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li>Typert \u751f\u6210\u65b9\u6cd5\u63cf\u8ff0\u548c Zod schema\u3002<\/li>\n\n\n\n<li>Client \u4fa7\u901a\u8fc7\u751f\u6210\u7684\u8fdc\u7a0b\u5ba2\u6237\u7aef\u8c03\u7528\uff0c\u53c2\u6570\u548c\u8fd4\u56de\u503c\u5728\u4e24\u7aef\u6821\u9a8c\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u200b<code>dsh-plugin-shop<\/code>\u200b \u5c31\u662f\u4e00\u4e2a\u5b8c\u6574\u4f8b\u5b50\uff1aHost \u4fa7\u6709\u5546\u5e97\u670d\u52a1\uff0cClient \u4fa7\u53ea\u80fd\u8c03\u7528\u5b83\u66b4\u9732\u7684\u4e5d\u4e2a \u200b<code>shop\/*<\/code>\u200b \u65b9\u6cd5\uff0c\u4e0d\u80fd\u76f4\u63a5\u8bbf\u95ee\u6587\u4ef6\u7cfb\u7edf\u6216\u7f51\u7edc\u3002\u8fd9\u79cd\u62c6\u5206\u65e2\u662f\u67b6\u6784\u8fb9\u754c\uff0c\u4e5f\u662f\u5b89\u5168\u8fb9\u754c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.2 Host \u4fa7\u9aa8\u67b6<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>import { Remote, TypertRemoteService } from '@deepseek-ai\/dsh-typert-protocol'\n\nexport class HelloRemote extends TypertRemoteService {\n  @Remote('ping')\n  async ping(input: { name: string }) {\n    return { message: `pong, ${input.name}` }\n  }\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u70b9\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-5czxctu\" class=\"wp-block-list\">\n<li>\u7ee7\u627f \u200b<code>TypertRemoteService<\/code>\u200b\uff0c\u7528 \u200b<code>@Remote('\u65b9\u6cd5\u540d')<\/code>\u200b \u6807\u8bb0\u53ef\u88ab Client \u8c03\u7528\u7684\u65b9\u6cd5\u3002<\/li>\n\n\n\n<li>\u65b9\u6cd5\u53c2\u6570\u548c\u8fd4\u56de\u503c\u9700\u8981\u80fd\u88ab schema \u63cf\u8ff0\uff1b\u751f\u6210\u5668\u4f1a\u636e\u6b64\u4ea7\u51fa\u4e24\u7aef\u7684\u7c7b\u578b\u548c\u6821\u9a8c\u3002<\/li>\n\n\n\n<li>\u751f\u6210\u4ea7\u7269\u901a\u5e38\u53eb \u200b<code>typert.host.js<\/code>\u200b \u548c \u200b<code>typert.remote-client.js<\/code>\u200b\uff0c\u7531 \u200b<code>@deepseek-ai\/dsh-typert-generator<\/code>\u200b \u751f\u6210\uff0c\u4e0d\u8981\u624b\u6539\u3002<\/li>\n\n\n\n<li>\u751f\u6210\u4ea7\u7269\u901a\u8fc7 loader \u6ce8\u518c\uff0c\u6216\u5728\u4ee3\u7801\u91cc\u8c03\u7528 \u200b<code>ctx.typert.register(contribution)<\/code>\u200b\u3002<\/li>\n\n\n\n<li>\u53ea\u66b4\u9732 Client \u771f\u6b63\u9700\u8981\u7684\u65b9\u6cd5\u3002\u6bcf\u591a\u4e00\u4e2a\u65b9\u6cd5\uff0c\u5c31\u591a\u4e00\u4e2a\u653b\u51fb\u9762\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u88c5\u9970\u5668\u9700\u8981 TypeScript \u88c5\u9970\u5668\u914d\u7f6e\u3002\u4e0d\u540c\u63d2\u4ef6\u7684\u6784\u5efa\u914d\u7f6e\u4e0d\u5b8c\u5168\u4e00\u6837\uff0c\u5efa\u8bae\u76f4\u63a5\u53c2\u8003 \u200b<code>dsh-plugin-shop<\/code>\u200b \u7684 \u200b<code>tsconfig<\/code>\u200b\u3001\u200b<code>tsdown<\/code>\u200b \u914d\u7f6e\u548c\u751f\u6210\u811a\u672c\uff0c\u800c\u4e0d\u662f\u4ece\u96f6\u731c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.3 Client \u4fa7\u8c03\u7528<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Client \u4fa7 import \u751f\u6210\u7684\u8fdc\u7a0b\u5ba2\u6237\u7aef\uff0c\u7136\u540e\u50cf\u8c03\u7528\u672c\u5730\u5f02\u6b65\u65b9\u6cd5\u4e00\u6837\u8c03\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>const result = await hello.ping({ name: 'DSH' })\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u9645\u5bfc\u5165\u8def\u5f84\u3001\u670d\u52a1\u540d\u548c\u8c03\u7528\u65b9\u5f0f\u7531\u751f\u6210\u5668\u51b3\u5b9a\u3002\u5173\u952e\u662f\uff1aClient \u53ea\u62ff\u5230\u58f0\u660e\u8fc7\u7684\u65b9\u6cd5\uff0c\u62ff\u4e0d\u5230 Host \u7684\u4efb\u610f\u5bf9\u8c61\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.4 \u4ec0\u4e48\u65f6\u5019\u4e0d\u9700\u8981 RPC<\/strong><\/h3>\n\n\n\n<ul id=\"20261025163433-vhyj053\" class=\"wp-block-list\">\n<li>\u7eaf\u9759\u6001\u9875\u9762\u3001\u8bf4\u660e\u5361\u7247\uff1a\u4e0d\u9700\u8981\u3002<\/li>\n\n\n\n<li>\u53ea\u8bfb\u53d6\u5bbf\u4e3b\u5df2\u7ecf\u63d0\u4f9b\u7684 props \u6216\u63d2\u69fd\u4e0a\u4e0b\u6587\uff1a\u4e0d\u9700\u8981\u3002<\/li>\n\n\n\n<li>\u9700\u8981\u8bbf\u95ee\u4f1a\u8bdd\u3001\u6587\u4ef6\u3001\u8bbe\u7f6e\u3001\u51ed\u636e\u3001\u540e\u53f0\u4efb\u52a1\uff1a\u9700\u8981\uff0c\u800c\u4e14\u5e94\u8be5\u8d70 Host \u670d\u52a1\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0d\u8981\u4e3a\u4e86\u300c\u770b\u8d77\u6765\u67b6\u6784\u5b8c\u6574\u300d\u800c\u7ed9\u6bcf\u4e2a\u5c0f\u7ec4\u4ef6\u90fd\u5957\u4e00\u5c42 RPC\uff1b\u4e5f\u4e0d\u8981\u4e3a\u4e86\u7701\u4e8b\u628a\u654f\u611f\u903b\u8f91\u653e\u5230 Client\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516d\u3001\u6253\u5305\u3001\u53d1\u5e03\u4e0e\u4e0a\u67b6<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.1 \u53d1\u5e03\u524d\u68c0\u67e5<\/strong><\/h3>\n\n\n\n<ul id=\"20261025163433-a504338\" class=\"wp-block-list\">\n<li>\u200b<code>package.json<\/code>\u200b \u7684 \u200b<code>name<\/code>\u200b\u3001\u200b<code>version<\/code>\u200b\u3001\u200b<code>license<\/code>\u200b\u3001\u200b<code>repository<\/code>\u200b \u5b8c\u6574\u3002<\/li>\n\n\n\n<li>\u200b<code>files<\/code>\u200b \u5305\u542b \u200b<code>lib<\/code>\u200b\u3001\u200b<code>cordis.patch.yml<\/code>\u200b\u3001README \u548c\u5fc5\u8981\u7684\u9759\u6001\u8d44\u6e90\u3002<\/li>\n\n\n\n<li>\u200b<code>exports<\/code>\u200b \u7684 \u200b<code>.<\/code>\u200b \u548c \u200b<code>.\/client<\/code>\u200b \u6307\u5411\u771f\u5b9e\u5b58\u5728\u7684\u6784\u5efa\u4ea7\u7269\u3002<\/li>\n\n\n\n<li>\u200b<code>dsh.bundle.patch<\/code>\u200b \u6307\u5411\u7684 YAML \u80fd\u88ab\u89e3\u6790\u3002<\/li>\n\n\n\n<li>\u200b<code>peerDependencies<\/code>\u200b \u4e0e\u5f53\u524d DSH \u7248\u672c\u5339\u914d\u3002<\/li>\n\n\n\n<li>\u5728\u4e00\u4e2a\u5e72\u51c0\u7684\u6d4b\u8bd5 profile \u4e2d\u5b89\u88c5\u3001\u542f\u52a8\u3001\u5378\u8f7d\u5404\u4e00\u6b21\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>pnpm build\nnpm publish --access public\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u5305\u540d\u5df2\u88ab\u5360\u7528\uff0c\u6539\u7528 scope\uff0c\u4f8b\u5982 \u200b<code>@your-name\/dsh-plugin-hello<\/code>\u200b\uff0c\u5e76\u540c\u6b65\u4fee\u6539 \u200b<code>cordis.patch.yml<\/code>\u200b \u91cc\u7684 \u200b<code>name<\/code>\u200b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.2 \u63d2\u4ef6\u5e02\u573a\u5982\u4f55\u53d1\u73b0\u4f60<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u200b<code>dsh-plugin-shop<\/code>\u200b \u4f1a\u4ece npm \u548c GitHub \u6536\u96c6\u5e26\u6709 \u200b<code>dsh-plugin<\/code>\u200b\u3001\u200b<code>deepseek-harness<\/code>\u200b \u5173\u952e\u8bcd\/\u4e3b\u9898\u7684\u5305\u3002\u4e00\u4e2a\u5305\u8981\u6210\u4e3a\u53ef\u5b89\u88c5\u63d2\u4ef6\uff0c\u81f3\u5c11\u8981\u6709\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-1zxkn2s\" class=\"wp-block-list\">\n<li>\u200b<code>dsh.bundle<\/code>\u200b\uff08\u5426\u5219\u5b83\u53ea\u662f\u4e00\u4e2a\u666e\u901a\u5e93\uff09\u3002<\/li>\n\n\n\n<li>\u53ef\u6838\u9a8c\u7684\u8bb8\u53ef\u8bc1\u548c\u4ed3\u5e93\u3002<\/li>\n\n\n\n<li>\u6ca1\u6709\u4f1a\u5728\u5b89\u88c5\u65f6\u5931\u8d25\u7684\u751f\u547d\u5468\u671f\u811a\u672c\u6216\u4e0d\u5408\u7406\u7684 \u200b<code>workspace:<\/code>\u200b \u4f9d\u8d56\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e02\u573a\u505a\u7684\u662f\u673a\u68b0\u7b5b\u9009\uff0c\u4e0d\u662f\u4eba\u5de5\u5b89\u5168\u5ba1\u8ba1\u3002\u5373\u4f7f\u4e0a\u67b6\uff0c\u4e5f\u4e0d\u4ee3\u8868\u4ee3\u7801\u88ab\u9010\u884c\u5ba1\u67e5\u8fc7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6.3 \u7248\u672c\u4e0e\u517c\u5bb9\u6027<\/strong><\/h3>\n\n\n\n<ul id=\"20261025163433-jf4zfkx\" class=\"wp-block-list\">\n<li>\u7528 semver \u7ba1\u7406\u7248\u672c\uff1b\u7834\u574f\u6027\u6539\u52a8\u5347 major\u3002<\/li>\n\n\n\n<li>\u200b<code>engines.dsh<\/code>\u200b \u5199\u4f60\u5b9e\u9645\u6d4b\u8bd5\u8fc7\u7684\u8303\u56f4\uff0c\u4e0d\u8981\u5199\u300c\u5168\u7248\u672c\u517c\u5bb9\u300d\u3002<\/li>\n\n\n\n<li>\u5728 README \u4e2d\u5199\u6e05\u695a\u652f\u6301\u7684 DSH \u7248\u672c\u3001profile\u3001Node \u7248\u672c\u548c\u5916\u90e8\u4f9d\u8d56\uff08\u4f8b\u5982 ffmpeg\uff09\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u63d2\u4ef6\u4f9d\u8d56\u67d0\u4e2a DSH \u5185\u90e8\u63d2\u69fd\u6216\u5185\u90e8\u670d\u52a1\uff0c\u660e\u786e\u6807\u6ce8\u7248\u672c\u8303\u56f4\uff1b\u8fd9\u4e9b\u63a5\u53e3\u6bd4\u516c\u5f00 API \u66f4\u5bb9\u6613\u53d8\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e03\u3001\u8c03\u8bd5\u4e0e\u6392\u969c<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u73b0\u8c61<\/th><th>\u53ef\u80fd\u539f\u56e0<\/th><th>\u5904\u7406<\/th><\/tr><\/thead><tbody><tr><td>\u200b<code>--profile<\/code>\u200b \u7f3a\u5931<\/td><td>\u547d\u4ee4\u6ca1\u5199 profile<\/td><td>\u52a0\u4e0a \u200b<code>--profile web<\/code>\u200b \u6216\u4f60\u7684 profile \u540d<\/td><\/tr><tr><td>\u200b<code>pnpm not found<\/code>\u200b<\/td><td>\u672c\u673a\u6ca1\u6709 pnpm<\/td><td>\u200b<code>npm install -g pnpm<\/code>\u200b<\/td><\/tr><tr><td>\u63d2\u4ef6\u4e0d\u5728\u5217\u8868<\/td><td>\u5b89\u88c5\u672a\u5b8c\u6210\uff0c\u6216 bundle \u672a\u5199\u5165<\/td><td>\u200b<code>dsh plugin --profile web list --depth 0<\/code>\u200b\uff0c\u68c0\u67e5 \u200b<code>package.json<\/code>\u200b \u7684 \u200b<code>dsh.profile.bundles<\/code>\u200b<\/td><\/tr><tr><td>\u200b<code>client bundles not found ... lib\/client.js<\/code>\u200b<\/td><td>\u6ca1\u6784\u5efa Client \u4fa7\uff0c\u6216 \u200b<code>exports<\/code>\u200b \u8def\u5f84\u4e0d\u5bf9<\/td><td>\u8865 \u200b<code>src\/client.tsx<\/code>\u200b \u548c\u5ba2\u6237\u7aef\u6784\u5efa\u914d\u7f6e<\/td><\/tr><tr><td>\u5de5\u5177\u4e0d\u51fa\u73b0<\/td><td>Host \u63d2\u4ef6\u672a\u52a0\u8f7d\uff0c\u6216 \u200b<code>inject<\/code>\u200b \u5199\u9519<\/td><td>\u200b<code>dsh --profile web --dump-config<\/code>\u200b\uff0c\u770b\u65e5\u5fd7\uff0c\u91cd\u542f profile<\/td><\/tr><tr><td>\u6807\u7b7e\u9875\u4e0d\u51fa\u73b0<\/td><td>Client \u4fa7\u672a\u52a0\u8f7d\u3001\u63d2\u69fd\u540d\u4e0d\u5bf9\u3001id \u51b2\u7a81<\/td><td>\u91cd\u542f\u5e76\u5237\u65b0\uff0c\u67e5\u770b\u6d4f\u89c8\u5668\u63a7\u5236\u53f0<\/td><\/tr><tr><td>\u914d\u7f6e\u88ab\u62d2\u7edd<\/td><td>\u200b<code>Config<\/code>\u200b \u4e0e patch \u7684 \u200b<code>config<\/code>\u200b \u4e0d\u5339\u914d<\/td><td>\u68c0\u67e5\u5b57\u6bb5\u540d\u3001\u7c7b\u578b\u3001\u9ed8\u8ba4\u503c<\/td><\/tr><tr><td>\u4fdd\u5b58\u8bbe\u7f6e\u51b2\u7a81<\/td><td>\u53e6\u4e00\u4e2a\u6807\u7b7e\u9875\u6216\u5916\u90e8\u7f16\u8f91\u6539\u4e86 settings<\/td><td>\u91cd\u65b0\u52a0\u8f7d\u540e\u518d\u4fdd\u5b58<\/td><\/tr><tr><td>peer \u7248\u672c\u88ab\u62d2<\/td><td>\u63d2\u4ef6\u58f0\u660e\u7684 DSH \u7248\u672c\u4e0e\u5f53\u524d\u4e0d\u7b26<\/td><td>\u5bf9\u9f50\u7248\u672c\uff0c\u6216\u6309\u63d2\u4ef6\u9762\u677f\u63d0\u793a\u5904\u7406<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u7528\u547d\u4ee4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u67e5\u770b\u5df2\u5b89\u88c5\u63d2\u4ef6\ndsh plugin --profile web list --depth 0\n\n# \u67e5\u770b\u7ec4\u5408\u540e\u7684\u914d\u7f6e\u6811\ndsh --profile web --dump-config\n\n# \u91cd\u65b0\u542f\u52a8\ndsh --profile web --no-open --port 8080\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e5\u5fd7\u4f4d\u7f6e\uff1a<\/p>\n\n\n\n<ul id=\"20261025163433-uv51z7g\" class=\"wp-block-list\">\n<li>\u200b<code>~\/.dsh\/logs<\/code>\u200b\uff1aDSH \u4e3b\u65e5\u5fd7\u3002<\/li>\n\n\n\n<li>\u200b<code>~\/.dsh\/profiles\/&lt;profile>\/.plugin-manager\/logs<\/code>\u200b\uff1a\u63d2\u4ef6\u7ba1\u7406\u76f8\u5173\u65e5\u5fd7\u3002<\/li>\n\n\n\n<li>\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177\uff1aClient \u4fa7\u62a5\u9519\u3001\u63d2\u69fd\u6ce8\u518c\u5931\u8d25\u3001\u7ec4\u4ef6\u5f02\u5e38\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u516b\u3001\u5b89\u5168\u4e0e\u8d28\u91cf\u6e05\u5355<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5f00\u53d1\u63d2\u4ef6\u65f6\uff0c\u81f3\u5c11\u8fc7\u4e00\u904d\u4e0b\u9762\u51e0\u9879\uff1a<\/p>\n\n\n\n<ol id=\"20261025163433-5wyvio5\" class=\"wp-block-list\">\n<li>\u200b<strong>\u6700\u5c0f\u4f9d\u8d56<\/strong>\u200b\uff1a\u53ea \u200b<code>inject<\/code>\u200b \u771f\u6b63\u9700\u8981\u7684\u670d\u52a1\uff0c\u4e0d\u8981\u4e3a\u4e86\u7701\u4e8b\u628a\u6587\u4ef6\u3001\u7f51\u7edc\u3001\u8fdb\u7a0b\u670d\u52a1\u5168\u62ff\u4e00\u904d\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u8f93\u5165\u6821\u9a8c<\/strong>\u200b\uff1a\u5de5\u5177\u53c2\u6570\u4f9d\u8d56 schema \u6821\u9a8c\uff0c\u4f46\u4e1a\u52a1\u7ea6\u675f\uff08\u957f\u5ea6\u3001\u8303\u56f4\u3001\u8def\u5f84\uff09\u4ecd\u8981\u5728 \u200b<code>execute<\/code>\u200b \u91cc\u68c0\u67e5\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u53d6\u6d88\u4e0e\u8d85\u65f6<\/strong>\u200b\uff1a\u628a \u200b<code>exec.signal<\/code>\u200b \u4f20\u7ed9\u8017\u65f6\u64cd\u4f5c\uff1b\u5916\u90e8\u8bf7\u6c42\u8bbe\u7f6e\u8d85\u65f6\uff0c\u907f\u514d\u63d2\u4ef6\u6302\u6b7b\u6574\u4e2a\u56de\u5408\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u8f93\u51fa\u4e0a\u9650<\/strong>\u200b\uff1a\u5927\u7ed3\u679c\u8981\u622a\u65ad\u6216\u843d\u76d8\uff0c\u4e0d\u8981\u628a\u51e0 MB \u6587\u672c\u76f4\u63a5\u585e\u56de\u6a21\u578b\u4e0a\u4e0b\u6587\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u4e0d\u8bb0\u5f55\u5bc6\u94a5<\/strong>\u200b\uff1a\u65e5\u5fd7\u3001\u9519\u8bef\u4fe1\u606f\u3001Client \u4ee3\u7801\u91cc\u90fd\u4e0d\u8981\u51fa\u73b0 API Key\u3001Token \u6216\u7528\u6237\u9690\u79c1\u3002<\/li>\n\n\n\n<li>\u200b<strong>Client \u4fa7\u4e0d\u4fe1\u4efb\u8f93\u5165<\/strong>\u200b\uff1a\u6d4f\u89c8\u5668\u4fa7\u7684\u53c2\u6570\u540c\u6837\u53ef\u80fd\u88ab\u7be1\u6539\uff0cHost \u4fa7\u5fc5\u987b\u91cd\u65b0\u6821\u9a8c\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u6743\u9650\u8fb9\u754c<\/strong>\u200b\uff1a\u80fd\u8d70 Host \u6587\u4ef6\u7b56\u7565\u7684\u64cd\u4f5c\uff0c\u4e0d\u8981\u7ed5\u5230 Client \u6216\u88f8 \u200b<code>fetch<\/code>\u200b\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u6d4b\u8bd5\u5378\u8f7d<\/strong>\u200b\uff1a\u542f\u7528\u3001\u7981\u7528\u3001\u66f4\u65b0\u3001\u5378\u8f7d\u5404\u8d70\u4e00\u904d\uff0c\u786e\u8ba4\u6ca1\u6709\u6b8b\u7559\u6ce8\u518c\u6216\u91cd\u590d id\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u7248\u672c\u58f0\u660e<\/strong>\u200b\uff1a\u200b<code>engines.dsh<\/code>\u200b \u548c peer \u8303\u56f4\u5199\u5b9e\u9645\u6d4b\u8bd5\u8fc7\u7684\u503c\u3002<\/li>\n\n\n\n<li>\u200b<strong>\u8bb8\u53ef\u8bc1\u4e0e\u4ed3\u5e93<\/strong>\u200b\uff1a\u8981\u8ba9\u7528\u6237\u80fd\u5ba1\u8ba1\u4f60\u7684\u4ee3\u7801\uff0c\u5c24\u5176\u662f\u4f1a\u4e0a\u67b6\u5e02\u573a\u7684\u63d2\u4ef6\u3002<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e5d\u3001\u53c2\u8003\u6765\u6e90<\/strong><\/h2>\n\n\n\n<ul id=\"20261025163433-nlkhz5l\" class=\"wp-block-list\">\n<li>DSH \u4ed3\u5e93\uff1a<a rel=\"nofollow\" href=\"https:\/\/github.com\/deepseek-ai\/deepseek-harness\">https:\/\/github.com\/deepseek-ai\/deepseek-harness<\/a><\/li>\n\n\n\n<li>npm \u5305 \u200b<code>@deepseek-ai\/dsh<\/code>\u200b\uff1a<a rel=\"nofollow\" href=\"https:\/\/www.npmjs.com\/package\/@deepseek-ai\/dsh\">https:\/\/www.npmjs.com\/package\/@deepseek-ai\/dsh<\/a><\/li>\n\n\n\n<li>\u968f\u5305\u6587\u6863\uff1a\u200b<code>@deepseek-ai\/dsh-tools<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/dsh-commands<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/dsh-typert-registry<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/dsh-client-ui-settings-models<\/code>\u200b\u3001\u200b<code>@deepseek-ai\/dsh-base<\/code>\u200b<\/li>\n\n\n\n<li>\u200b<code>dsh-plugin-shop<\/code>\u200b \u6e90\u7801\u4e0e README\uff1a<a rel=\"nofollow\" href=\"https:\/\/github.com\/LivXue\/dsh-plugin-shop\">https:\/\/github.com\/LivXue\/dsh-plugin-shop<\/a><\/li>\n\n\n\n<li>\u200b<code>dsh-context<\/code>\u200b \u6e90\u7801\u4e0e README\uff1a<a rel=\"nofollow\" href=\"https:\/\/github.com\/bowenliang123\/dsh-context\">https:\/\/github.com\/bowenliang123\/dsh-context<\/a><\/li>\n\n\n\n<li>\u200b<code>dsh-image-gen<\/code>\u200b \u6e90\u7801\u4e0e README\uff1a<a rel=\"nofollow\" href=\"https:\/\/github.com\/shanliuling\/dsh-image-gen\">https:\/\/github.com\/shanliuling\/dsh-image-gen<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u5148\u7406\u89e3 DSH \u7684\u63d2\u4ef6\u6a21\u578b DSH \u7684\u63d2\u4ef6\u8fd0\u884c\u65f6\u57fa\u4e8e Cordis\u3002\u4e00\u4e2a\u63d2\u4ef6\u672c\u8d28\u4e0a\u662f\u4e00\u4e2a\u6a21\u5757\uff0c\u5b83\u5bfc\u51fa\u51e0\u6837\u4e1c\u897f\uff1a \u200binject\u200b \u58f0\u660e\u4f9d\u8d56\u7684\u670d\u52a1\uff1bCordis \u4f1a\u5728\u8fd9\u4e9b\u670d\u52a1\u53ef\u7528\u65f6\u8c03\u7528 \u200bapply\u200b\uff0c\u5e76\u5728\u63d2\u4ef6\u5378\u8f7d\u6216\u4f9d\u8d56\u6d88\u5931\u65f6\u91ca\u653e\u5b83\u6ce8\u518c\u7684&#8230;<\/p>\n","protected":false},"author":1,"featured_media":28,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,7],"topic":[],"class_list":["post-30","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-welcome","tag-deepseek-harness","tag-dsh"],"_links":{"self":[{"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/posts\/30","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/comments?post=30"}],"version-history":[{"count":1,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/posts\/30\/revisions\/31"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/media\/28"}],"wp:attachment":[{"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/media?parent=30"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/categories?post=30"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/tags?post=30"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/mapleferry.net\/index.php\/wp-json\/wp\/v2\/topic?post=30"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}