@czj-git/dsh-plugin-hub 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.en.md +93 -6
  2. package/README.md +93 -6
  3. package/dist/api.d.ts +4 -199
  4. package/dist/api.d.ts.map +1 -0
  5. package/dist/api.js +5 -90
  6. package/dist/api.js.map +1 -0
  7. package/dist/client/PluginHubSettings.d.ts +19 -0
  8. package/dist/client/PluginHubSettings.d.ts.map +1 -0
  9. package/dist/client/PluginHubSettings.js +172 -0
  10. package/dist/client/PluginHubSettings.js.map +1 -0
  11. package/dist/client/api.d.ts +18 -0
  12. package/dist/client/api.d.ts.map +1 -0
  13. package/dist/client/api.js +59 -0
  14. package/dist/client/api.js.map +1 -0
  15. package/dist/client/index.d.ts +15 -0
  16. package/dist/client/index.d.ts.map +1 -0
  17. package/dist/client/index.js +43 -0
  18. package/dist/client/index.js.map +1 -0
  19. package/dist/client/locales.d.ts +54 -0
  20. package/dist/client/locales.d.ts.map +1 -0
  21. package/dist/client/locales.js +100 -0
  22. package/dist/client/locales.js.map +1 -0
  23. package/dist/client.js +833 -0
  24. package/dist/client.js.map +7 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +9 -0
  27. package/dist/index.js.map +1 -0
  28. package/dist/render.d.ts.map +1 -0
  29. package/dist/render.js.map +1 -0
  30. package/dist/schemas.d.ts +285 -0
  31. package/dist/schemas.d.ts.map +1 -0
  32. package/dist/schemas.js +85 -0
  33. package/dist/schemas.js.map +1 -0
  34. package/dist/shared.d.ts +32 -0
  35. package/dist/shared.d.ts.map +1 -0
  36. package/dist/shared.js +26 -0
  37. package/dist/shared.js.map +1 -0
  38. package/dist/tool-schema.d.ts.map +1 -0
  39. package/dist/tool-schema.js.map +1 -0
  40. package/dist/web-route.d.ts +19 -0
  41. package/dist/web-route.d.ts.map +1 -0
  42. package/dist/web-route.js +115 -0
  43. package/dist/web-route.js.map +1 -0
  44. package/package.json +50 -5
package/README.en.md CHANGED
@@ -1,14 +1,23 @@
1
1
  # DSH Plugin Hub plugin
2
2
 
3
- English | [中文](README.md)
3
+ English | [中文](https://github.com/czj-git/dsh-plugin-hub/blob/main/README.md)
4
4
 
5
- Connects the public, read-only [DSH Plugin Hub](https://dshpluginhub.dev) search API to DeepSeek Harness. Agents can discover published and verified plugins, inspect rankings, and receive install commands, compatibility data, community metrics, and source links.
5
+ Find plugins without leaving DeepSeek Harness: browse the marketplace and rankings in **Settings Plugin Hub**, or ask your Agent to search directly in a conversation.
6
+
7
+ The plugin connects to the public, read-only [DSH Plugin Hub](https://dshpluginhub.dev) search API for published and verified community plugins, install commands, compatibility data, community metrics, and source links. The Settings page and conversation tools coexist; opening the marketplace website is not required to search.
8
+
9
+ [Install](#install-and-run) · [Browse in Settings](#plugin-hub-in-settings) · [Search in a conversation](#search-in-a-conversation) · [Tool inputs](#tool-inputs) · [Response fields](#tool-output) · [Configuration](#configuration)
6
10
 
7
11
  ## Capabilities
8
12
 
9
- - `dsh_plugin_search`: search by task, feature, plugin name, repository, or author.
10
- - `dsh_plugin_rankings`: list daily growth, Top Stars, newly listed, or recently active plugins.
11
- - Filter localized results by category, runtime type, installation source, ordering, and page.
13
+ | Entry point | How to use it | What you get |
14
+ |---|---|---|
15
+ | Settings · Plugin marketplace | Browse by keyword, category, and page | Cards with owner, description, verification, Stars, views, source, language, and a copyable install command. |
16
+ | Settings · Rankings | Choose Daily growth, Top Stars, Newly listed, or Recently active | Ranked plugins with the selected metric and category filtering. |
17
+ | Conversation · `dsh_plugin_search` | Describe a feature or name a plugin, repository, or author | Search results, install commands, and source links. |
18
+ | Conversation · `dsh_plugin_rankings` | Ask your Agent for a specific ranking | Ranked results, install commands, and source links. |
19
+
20
+ - Read Chinese or English descriptions; the conversation search tool also supports category, runtime type, installation source, ordering, and page filters.
12
21
  - Return concise actionable text in Native mode and the complete structured result in Code Mode.
13
22
  - Validate every public API response field and expose pagination, data freshness, and anonymous quota metadata.
14
23
  - Honor Harness cancellation, configurable timeouts, 429 retry information, and stable error categories.
@@ -17,6 +26,8 @@ The plugin only calls the public `GET /api/v1/plugins/search` endpoint. It requi
17
26
 
18
27
  ## Install and run
19
28
 
29
+ Requires an installed DeepSeek Harness and Node.js `^22.19.0 || >=24.0.0`. The Settings page requires Web-profile client extension support; it does not appear in an environment without the Web client. Plugin searches need no additional API key; conversation use still requires a working model configured in Harness.
30
+
20
31
  Install the npm package into the Web profile:
21
32
 
22
33
  ```sh
@@ -30,6 +41,80 @@ dsh --profile web --dump-config
30
41
  dsh --profile web
31
42
  ```
32
43
 
44
+ Open **Settings → Plugin Hub**, or try a [conversation prompt](#search-in-a-conversation) below. If Harness is already running, restart it after installing or updating the plugin, then refresh the page.
45
+
46
+ ## Plugin Hub in Settings
47
+
48
+ After the Web profile starts, open Harness Settings and select **Plugin Hub** in the left sidebar. The page uses the native Settings layout and Harness theme variables, follows the active Chinese or English locale, and never embeds an external page. Switching languages refetches the marketplace and rankings in the active locale and updates descriptions, detail links, and date formatting without a page reload; unfinished requests for the previous locale are cancelled.
49
+
50
+ ### Plugin marketplace
51
+
52
+ ![Harness Settings marketplace with search, all categories, and plugin cards](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/settings-marketplace-en.png)
53
+
54
+ *Dark mode · Settings → Plugin Hub, with search, category filters, and plugin cards. Click the screenshot to view the original.*
55
+
56
+ - Published and verified plugins default to GitHub Stars ordering; entering a keyword switches to relevance ordering.
57
+ - Nine marketplace categories and pagination are available. Category filters wrap so every option stays visible. The compact two-column desktop grid becomes one column in a narrow window.
58
+ - Each card shows the plugin name, owner, description, verification, category, Stars, views, package source, and primary language.
59
+ - **Copy command** writes the public `dsh plugin --profile ... add ...` command to the clipboard. The page does not bypass Harness permissions or mutate a profile directly.
60
+ - The plugin name and detail arrow open its public DSH Plugin Hub detail page in the browser.
61
+
62
+ ### Rankings
63
+
64
+ ![Harness Settings in dark mode showing Newly listed, category filtering, and listing dates](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/settings-rankings-en.png)
65
+
66
+ *Newly listed orders plugins by their first listing time. Daily growth, Top stars, and Recently active are also available.*
67
+
68
+ - **Daily growth** uses GitHub Star change between the latest two successful metric snapshots and shows “Pending” without a baseline.
69
+ - **Top Stars** orders by total GitHub Stars.
70
+ - **Newly listed** orders by first listing time in DSH Plugin Hub.
71
+ - **Recently active** orders by the latest GitHub push time.
72
+ - A compact single-column list retains rank, avatar, owner, description, category, verification, and the selected ranking metric, with category filtering and pagination.
73
+
74
+ The catalog keeps changing. Counts, positions, and metrics in screenshots reflect capture time, not a fixed catalog size.
75
+
76
+ ## Search in a conversation
77
+
78
+ The Settings page is not the only entry point. When the plugin is enabled, the Agent can still call `dsh_plugin_search` and `dsh_plugin_rankings` without opening Settings or asking you to write JSON. Send any one of these prompts in a Harness conversation:
79
+
80
+ Find a feature:
81
+
82
+ ```text
83
+ Use DSH Plugin Hub to search for memory plugins. Return up to 5 results, explain their purpose in English, and include install commands and detail links. Do not install anything.
84
+ ```
85
+
86
+ Browse a ranking:
87
+
88
+ ```text
89
+ Use DSH Plugin Hub to show the top 10 plugins by GitHub Stars. Describe them in English and include detail links.
90
+ ```
91
+
92
+ Discover new plugins:
93
+
94
+ ```text
95
+ Use DSH Plugin Hub to show the 5 most recently listed plugins. Explain their purpose and provide install commands.
96
+ ```
97
+
98
+ ![Harness conversation in dark mode showing a dsh_plugin_rankings call and Top Stars results](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/chat-rankings-en.png)
99
+
100
+ *Conversation example: the Agent calls `dsh_plugin_rankings` and presents Top Stars with descriptions, install commands, and source links.*
101
+
102
+ The model decides whether to call a tool and how to compose its answer. If it does not call one, explicitly ask: “Call `dsh_plugin_search` with `memory` as the query and `en` as the locale.” Search uses keyword matching; if no results appear, try a shorter Chinese or English keyword or remove a filter.
103
+
104
+ Returned install commands are text, not profile changes. Installing a plugin requires a separate request and remains subject to Harness permissions and approvals. Native mode's compact result omits some compatibility and timestamp fields; use Code Mode to read the [complete structured result](#tool-output) when you need those details.
105
+
106
+ ## How it works
107
+
108
+ ```mermaid
109
+ flowchart TD
110
+ settings["Settings: marketplace / rankings"] --> proxy["Host same-origin search route"]
111
+ chat["Conversation: search / ranking tools"] --> client["Shared PluginHubClient"]
112
+ proxy --> client
113
+ client --> api["DSH Plugin Hub public read-only search API"]
114
+ ```
115
+
116
+ The browser does not call the cross-origin public API directly. The plugin Host registers a read-only same-origin `/api/dsh-plugin-hub/search` route, validates query parameters again, and applies the same complete response validation used by the Agent tools. The route accepts only `GET` and `OPTIONS`; it exposes no user data and provides no installation or other write operation. Both entry points share the API client and response validation.
117
+
33
118
  ## Configuration
34
119
 
35
120
  The bundle supplies these defaults:
@@ -74,7 +159,7 @@ Example input:
74
159
 
75
160
  ```json
76
161
  {
77
- "query": "help a text-only agent understand screenshots",
162
+ "query": "vision",
78
163
  "locale": "en",
79
164
  "category": "multimodal-creative",
80
165
  "type": "hybrid",
@@ -201,6 +286,8 @@ Both tools return the same structured value. Code Mode can consume every field.
201
286
 
202
287
  ### Complete structured output example
203
288
 
289
+ This is a field-reference example. Plugin names, metrics, and dates are illustrative, not current catalog data; do not treat the example package name as a real installation target.
290
+
204
291
  ```json
205
292
  {
206
293
  "items": [
package/README.md CHANGED
@@ -1,14 +1,23 @@
1
1
  # DSH Plugin Hub 插件
2
2
 
3
- [English](README.en.md) | 中文
3
+ [English](https://github.com/czj-git/dsh-plugin-hub/blob/main/README.en.md) | 中文
4
4
 
5
- [DSH Plugin Hub](https://dshpluginhub.dev) 的公开、只读搜索 API 接入 DeepSeek Harness。Agent 可以在对话中搜索已发布且通过验证的插件,查看排行榜,并取得安装命令、兼容性、社区指标和来源链接。
5
+ DeepSeek Harness 里找插件:既可以打开「设置 插件中心」浏览市场和排行榜,也可以直接在对话中让 Agent 搜索。
6
+
7
+ 本插件连接 [DSH Plugin Hub](https://dshpluginhub.dev) 的公开、只读搜索 API,提供已发布且通过验证的社区插件信息、安装命令、兼容性、社区指标和来源链接。设置页面和对话工具同时保留,不需要打开市场网页才能搜索。
8
+
9
+ [安装](#安装与启动) · [设置内浏览](#settings-插件中心) · [对话搜索](#在对话中搜索插件) · [工具输入](#工具输入) · [返回字段](#工具输出) · [配置](#配置)
6
10
 
7
11
  ## 能做什么
8
12
 
9
- - `dsh_plugin_search`:按任务、功能、插件名、仓库或作者搜索插件。
10
- - `dsh_plugin_rankings`:查询日增长、Star 总榜、最新上架和最近活跃榜单。
11
- - 支持中文和英文描述,以及分类、运行形态、安装来源、排序和分页筛选。
13
+ | 入口 | 用法 | 可以看到什么 |
14
+ |---|---|---|
15
+ | 设置 · 插件市场 | 按关键词、分类和分页浏览 | 插件卡片、作者、简介、验证状态、Stars、浏览量、来源、主要语言与可复制的安装命令。 |
16
+ | 设置 · 排行榜 | 切换日增长、Star 总榜、最新上架或最近活跃 | 带排名和对应指标的插件列表,支持分类筛选。 |
17
+ | 对话 · `dsh_plugin_search` | 告诉 Agent 想找的功能、插件名、仓库或作者 | 搜索结果、安装命令和来源链接。 |
18
+ | 对话 · `dsh_plugin_rankings` | 让 Agent 查询指定榜单 | 排行结果、安装命令和来源链接。 |
19
+
20
+ - 支持中文和英文描述;对话搜索工具还可按分类、运行形态、安装来源、排序和分页筛选。
12
21
  - Native 模式向模型返回紧凑、便于后续操作的文本;Code Mode 返回完整结构化结果。
13
22
  - 校验公网 API 的每个返回字段,并暴露分页、数据更新时间和匿名限流信息。
14
23
  - 支持 Harness 取消信号、可配置超时、429 重试信息和稳定的错误分类。
@@ -17,6 +26,8 @@
17
26
 
18
27
  ## 安装与启动
19
28
 
29
+ 需要已安装的 DeepSeek Harness,以及 Node.js `^22.19.0 || >=24.0.0`。设置页需要 Web profile 的客户端扩展支持;在不提供 Web 客户端的环境中,设置页不会出现。插件检索无需额外 API Key;在对话中使用仍需要 Harness 已配置可用的模型。
30
+
20
31
  从 npm 安装到 Web profile:
21
32
 
22
33
  ```sh
@@ -30,6 +41,80 @@ dsh --profile web --dump-config
30
41
  dsh --profile web
31
42
  ```
32
43
 
44
+ 启动后可以打开「设置 → 插件中心」,也可以直接使用下面的[对话示例](#在对话中搜索插件)。如果已经运行 Harness,安装或更新插件后重新启动,再刷新页面。
45
+
46
+ ## Settings 插件中心
47
+
48
+ 启动 Web profile 后,打开 Harness 的「设置」,左侧会出现「插件中心」。这个页面采用 Harness 原生 Settings 布局和主题变量,随 Harness 的中英文语言切换,不会嵌入外部网页。切换语言后,市场和排行榜会按当前语言重新查询,简介、详情链接及日期格式同步更新,无需刷新页面;旧语言的未完成请求会被取消。
49
+
50
+ ### 插件市场
51
+
52
+ ![Harness 设置中的插件市场:搜索、完整分类和插件卡片](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/settings-marketplace-zh.png)
53
+
54
+ *深色模式 · 设置 → 插件中心:搜索、分类筛选与插件卡片。点击截图可查看原图。*
55
+
56
+ - 默认按 GitHub Stars 展示已发布且通过验证的插件;输入关键词后切换为相关性排序。
57
+ - 支持九个市场分类和分页;分类标签自动换行、完整展示,桌面端使用两列紧凑卡片,窄窗口自动改为单列。
58
+ - 每张卡片展示插件名、作者、简介、验证状态、分类、Stars、浏览量、安装来源和主要语言。
59
+ - 「复制安装命令」只把该插件公开的 `dsh plugin --profile ... add ...` 命令写入剪贴板;页面不会绕过 Harness 权限或直接修改 profile。
60
+ - 插件名和详情箭头会在浏览器中打开 DSH Plugin Hub 的公开详情页。
61
+
62
+ ### 排行榜
63
+
64
+ ![Harness 设置中的深色排行榜:最新上架、分类筛选和收录日期](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/settings-rankings-zh.png)
65
+
66
+ *最新上架榜按市场首次收录时间排序;也可以切换日增长、Star 总榜和最近活跃。*
67
+
68
+ - `日增长`:最近两个成功指标快照之间的 GitHub Star 变化;缺少基线时显示“待生成”。
69
+ - `Star 总榜`:按 GitHub Stars 总数排序。
70
+ - `最新上架`:按 DSH Plugin Hub 首次收录时间排序。
71
+ - `最近活跃`:按 GitHub 最近推送时间排序。
72
+ - 排行榜采用单列信息行,保留排名、头像、作者、简介、分类、验证状态和当前榜单指标,并支持分类筛选和分页。
73
+
74
+ 插件目录持续更新,截图中的数量、排名和指标仅代表拍摄时的状态,不是固定的收录数量。
75
+
76
+ ## 在对话中搜索插件
77
+
78
+ 设置页面不是唯一入口。插件启用后,Agent 仍可调用 `dsh_plugin_search` 和 `dsh_plugin_rankings`;不必先打开设置,也不需要手写 JSON。下面任选一句发送到 Harness 对话中:
79
+
80
+ 搜索具体功能:
81
+
82
+ ```text
83
+ 用 DSH Plugin Hub 搜索 memory 相关插件,选出最多 5 个,用中文说明用途,并给出安装命令和详情链接。不要执行安装。
84
+ ```
85
+
86
+ 查询排行榜:
87
+
88
+ ```text
89
+ 用 DSH Plugin Hub 查看 Star 最多的前 10 个插件,用中文介绍,并附上详情链接。
90
+ ```
91
+
92
+ 发现新插件:
93
+
94
+ ```text
95
+ 用 DSH Plugin Hub 查看最近新上架的 5 个插件,说明用途,并给出安装命令。
96
+ ```
97
+
98
+ ![Harness 深色对话中的 Memory 插件搜索结果,包含用途、安装命令和详情链接](https://raw.githubusercontent.com/czj-git/dsh-plugin-hub/main/docs/screenshots/chat-search-zh.png)
99
+
100
+ *对话搜索示例:让 Agent 查找 memory 相关插件,并整理用途、安装命令和详情链接。*
101
+
102
+ 模型负责决定是否调用工具和如何组织回答。若没有触发,可以明确说「请调用 `dsh_plugin_search`,用 `memory` 作为关键词,`locale` 设为 `zh`」。搜索基于关键词匹配;没有结果时,可以换一个更短的中英文关键词或减少筛选条件。
103
+
104
+ 工具返回的安装命令只是文本,不会直接修改 profile。执行安装仍需另行请求,并遵循 Harness 的权限与审批策略。Native 模式的紧凑结果不展示所有兼容性和时间字段;需要这些细节时,可使用 Code Mode 读取[完整结构化结果](#工具输出)。
105
+
106
+ ## 工作方式
107
+
108
+ ```mermaid
109
+ flowchart TD
110
+ settings["设置:插件市场 / 排行榜"] --> proxy["Host 同源搜索路由"]
111
+ chat["对话:搜索 / 排行工具"] --> client["共享 PluginHubClient"]
112
+ proxy --> client
113
+ client --> api["DSH Plugin Hub 公网只读搜索 API"]
114
+ ```
115
+
116
+ 浏览器不会直接请求跨域公网 API。插件的 Host 端注册只读同源路由 `/api/dsh-plugin-hub/search`,在转发前重新校验查询参数,再使用与 Agent 工具相同的完整响应校验。该路由只支持 `GET` 和 `OPTIONS`,不暴露用户数据,也不提供安装或其他写接口。两个入口共用 API 客户端和返回字段校验。
117
+
33
118
  ## 配置
34
119
 
35
120
  Bundle 默认配置:
@@ -74,7 +159,7 @@ Bundle 默认配置:
74
159
 
75
160
  ```json
76
161
  {
77
- "query": "让纯文本 Agent 看懂截图",
162
+ "query": "vision",
78
163
  "locale": "zh",
79
164
  "category": "multimodal-creative",
80
165
  "type": "hybrid",
@@ -201,6 +286,8 @@ Bundle 默认配置:
201
286
 
202
287
  ### 完整结构化输出示例
203
288
 
289
+ 以下为字段说明示例,插件名、指标和时间均为示例值,不代表当前目录;不要将示例包名作为真实安装目标。
290
+
204
291
  ```json
205
292
  {
206
293
  "items": [
package/dist/api.d.ts CHANGED
@@ -1,201 +1,7 @@
1
- import { z } from 'zod';
2
- /** Locales supported by the public DSH Plugin Hub API. */
3
- export declare const pluginHubLocales: readonly ["zh", "en"];
4
- /** Public plugin categories exposed by DSH Plugin Hub. */
5
- export declare const pluginHubCategories: readonly ["agent-workflow", "coding-tools", "models-data", "ui-experience", "integrations", "security-governance", "multimodal-creative", "observability-cost", "other"];
6
- /** Plugin runtime shapes supported by the public API. */
7
- export declare const pluginHubTypes: readonly ["host", "client", "hybrid"];
8
- /** Install sources supported by the public API. */
9
- export declare const pluginHubSources: readonly ["npm", "github"];
10
- /** Ordering modes supported by the public API. */
11
- export declare const pluginHubSorts: readonly ["relevance", "growth", "stars", "newest", "active"];
12
- export type PluginHubLocale = (typeof pluginHubLocales)[number];
13
- export type PluginHubCategory = (typeof pluginHubCategories)[number];
14
- export type PluginHubType = (typeof pluginHubTypes)[number];
15
- export type PluginHubSource = (typeof pluginHubSources)[number];
16
- export type PluginHubSort = (typeof pluginHubSorts)[number];
17
- declare const pluginSchema: z.ZodObject<{
18
- id: z.ZodString;
19
- slug: z.ZodString;
20
- name: z.ZodString;
21
- owner: z.ZodString;
22
- repo: z.ZodString;
23
- description: z.ZodString;
24
- type: z.ZodEnum<{
25
- host: "host";
26
- client: "client";
27
- hybrid: "hybrid";
28
- }>;
29
- category: z.ZodEnum<{
30
- "agent-workflow": "agent-workflow";
31
- "coding-tools": "coding-tools";
32
- "models-data": "models-data";
33
- "ui-experience": "ui-experience";
34
- integrations: "integrations";
35
- "security-governance": "security-governance";
36
- "multimodal-creative": "multimodal-creative";
37
- "observability-cost": "observability-cost";
38
- other: "other";
39
- }>;
40
- topics: z.ZodArray<z.ZodString>;
41
- language: z.ZodString;
42
- license: z.ZodString;
43
- package: z.ZodObject<{
44
- name: z.ZodString;
45
- version: z.ZodString;
46
- source: z.ZodEnum<{
47
- npm: "npm";
48
- github: "github";
49
- }>;
50
- sourceSpec: z.ZodString;
51
- installCommand: z.ZodString;
52
- profile: z.ZodString;
53
- }, z.core.$strip>;
54
- compatibility: z.ZodObject<{
55
- harnessVersion: z.ZodString;
56
- verificationLevel: z.ZodEnum<{
57
- "static-checked": "static-checked";
58
- "runtime-verified": "runtime-verified";
59
- }>;
60
- smokeStatus: z.ZodEnum<{
61
- "static-passed": "static-passed";
62
- passed: "passed";
63
- "manual-step-required": "manual-step-required";
64
- failed: "failed";
65
- "not-run": "not-run";
66
- }>;
67
- validatedAt: z.ZodString;
68
- }, z.core.$strip>;
69
- metrics: z.ZodObject<{
70
- stars: z.ZodNumber;
71
- starsDelta1d: z.ZodNullable<z.ZodNumber>;
72
- forks: z.ZodNumber;
73
- openIssues: z.ZodNumber;
74
- views: z.ZodNumber;
75
- }, z.core.$strip>;
76
- timestamps: z.ZodObject<{
77
- listedAt: z.ZodString;
78
- lastPushedAt: z.ZodString;
79
- sourceUpdatedAt: z.ZodString;
80
- }, z.core.$strip>;
81
- links: z.ZodObject<{
82
- detail: z.ZodURL;
83
- repository: z.ZodURL;
84
- }, z.core.$strip>;
85
- }, z.core.$strip>;
86
- declare const responseSchema: z.ZodObject<{
87
- items: z.ZodArray<z.ZodObject<{
88
- id: z.ZodString;
89
- slug: z.ZodString;
90
- name: z.ZodString;
91
- owner: z.ZodString;
92
- repo: z.ZodString;
93
- description: z.ZodString;
94
- type: z.ZodEnum<{
95
- host: "host";
96
- client: "client";
97
- hybrid: "hybrid";
98
- }>;
99
- category: z.ZodEnum<{
100
- "agent-workflow": "agent-workflow";
101
- "coding-tools": "coding-tools";
102
- "models-data": "models-data";
103
- "ui-experience": "ui-experience";
104
- integrations: "integrations";
105
- "security-governance": "security-governance";
106
- "multimodal-creative": "multimodal-creative";
107
- "observability-cost": "observability-cost";
108
- other: "other";
109
- }>;
110
- topics: z.ZodArray<z.ZodString>;
111
- language: z.ZodString;
112
- license: z.ZodString;
113
- package: z.ZodObject<{
114
- name: z.ZodString;
115
- version: z.ZodString;
116
- source: z.ZodEnum<{
117
- npm: "npm";
118
- github: "github";
119
- }>;
120
- sourceSpec: z.ZodString;
121
- installCommand: z.ZodString;
122
- profile: z.ZodString;
123
- }, z.core.$strip>;
124
- compatibility: z.ZodObject<{
125
- harnessVersion: z.ZodString;
126
- verificationLevel: z.ZodEnum<{
127
- "static-checked": "static-checked";
128
- "runtime-verified": "runtime-verified";
129
- }>;
130
- smokeStatus: z.ZodEnum<{
131
- "static-passed": "static-passed";
132
- passed: "passed";
133
- "manual-step-required": "manual-step-required";
134
- failed: "failed";
135
- "not-run": "not-run";
136
- }>;
137
- validatedAt: z.ZodString;
138
- }, z.core.$strip>;
139
- metrics: z.ZodObject<{
140
- stars: z.ZodNumber;
141
- starsDelta1d: z.ZodNullable<z.ZodNumber>;
142
- forks: z.ZodNumber;
143
- openIssues: z.ZodNumber;
144
- views: z.ZodNumber;
145
- }, z.core.$strip>;
146
- timestamps: z.ZodObject<{
147
- listedAt: z.ZodString;
148
- lastPushedAt: z.ZodString;
149
- sourceUpdatedAt: z.ZodString;
150
- }, z.core.$strip>;
151
- links: z.ZodObject<{
152
- detail: z.ZodURL;
153
- repository: z.ZodURL;
154
- }, z.core.$strip>;
155
- }, z.core.$strip>>;
156
- pagination: z.ZodObject<{
157
- page: z.ZodNumber;
158
- perPage: z.ZodNumber;
159
- total: z.ZodNumber;
160
- totalPages: z.ZodNumber;
161
- }, z.core.$strip>;
162
- meta: z.ZodObject<{
163
- apiVersion: z.ZodLiteral<"v1">;
164
- locale: z.ZodEnum<{
165
- zh: "zh";
166
- en: "en";
167
- }>;
168
- query: z.ZodString;
169
- sort: z.ZodEnum<{
170
- relevance: "relevance";
171
- growth: "growth";
172
- stars: "stars";
173
- newest: "newest";
174
- active: "active";
175
- }>;
176
- dataUpdatedAt: z.ZodString;
177
- }, z.core.$strip>;
178
- }, z.core.$strip>;
179
- export type PluginHubPlugin = z.infer<typeof pluginSchema>;
180
- export interface PluginHubRateLimit {
181
- limit: number | null;
182
- remaining: number | null;
183
- reset: string | null;
184
- retryAfterSeconds: number | null;
185
- }
186
- export interface PluginHubSearchResult extends z.infer<typeof responseSchema> {
187
- rateLimit: PluginHubRateLimit;
188
- }
189
- export interface PluginHubSearchInput {
190
- query?: string;
191
- locale?: PluginHubLocale;
192
- category?: PluginHubCategory;
193
- type?: PluginHubType;
194
- source?: PluginHubSource;
195
- sort?: PluginHubSort;
196
- page?: number;
197
- perPage?: number;
198
- }
1
+ import { type PluginHubSearchInput } from './shared.js';
2
+ import { type PluginHubSearchResult } from './schemas.js';
3
+ export * from './shared.js';
4
+ export type { PluginHubPlugin, PluginHubRateLimit, PluginHubSearchResult } from './schemas.js';
199
5
  export interface PluginHubClientOptions {
200
6
  baseUrl: string;
201
7
  timeoutMs: number;
@@ -242,5 +48,4 @@ export declare class PluginHubClient {
242
48
  */
243
49
  search(input: PluginHubSearchInput, signal: AbortSignal): Promise<PluginHubSearchResult>;
244
50
  }
245
- export {};
246
51
  //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAA;AACpB,OAAO,EAIL,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAC3B,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAE9F,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;CAChC;AAED,yEAAyE;AACzE,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACjD,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAEzC;;;;OAIG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;QACpC,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACjC,KAAK,CAAC,EAAE,OAAO,CAAA;KAChB;CAQF;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU7D;AA+BD,yEAAyE;AACzE,qBAAa,eAAe;;IAK1B;;;OAGG;gBACS,OAAO,EAAE,sBAAsB;IAM3C;;;;;OAKG;IACG,MAAM,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAkE/F"}
package/dist/api.js CHANGED
@@ -1,91 +1,6 @@
1
- import { z } from 'zod';
2
- /** Locales supported by the public DSH Plugin Hub API. */
3
- export const pluginHubLocales = ['zh', 'en'];
4
- /** Public plugin categories exposed by DSH Plugin Hub. */
5
- export const pluginHubCategories = [
6
- 'agent-workflow',
7
- 'coding-tools',
8
- 'models-data',
9
- 'ui-experience',
10
- 'integrations',
11
- 'security-governance',
12
- 'multimodal-creative',
13
- 'observability-cost',
14
- 'other',
15
- ];
16
- /** Plugin runtime shapes supported by the public API. */
17
- export const pluginHubTypes = ['host', 'client', 'hybrid'];
18
- /** Install sources supported by the public API. */
19
- export const pluginHubSources = ['npm', 'github'];
20
- /** Ordering modes supported by the public API. */
21
- export const pluginHubSorts = ['relevance', 'growth', 'stars', 'newest', 'active'];
22
- const nullableInteger = z.number().int().nullable();
23
- const pluginSchema = z.object({
24
- id: z.string(),
25
- slug: z.string(),
26
- name: z.string(),
27
- owner: z.string(),
28
- repo: z.string(),
29
- description: z.string(),
30
- type: z.enum(pluginHubTypes),
31
- category: z.enum(pluginHubCategories),
32
- topics: z.array(z.string()),
33
- language: z.string(),
34
- license: z.string(),
35
- package: z.object({
36
- name: z.string(),
37
- version: z.string(),
38
- source: z.enum(pluginHubSources),
39
- sourceSpec: z.string(),
40
- installCommand: z.string(),
41
- profile: z.string(),
42
- }),
43
- compatibility: z.object({
44
- harnessVersion: z.string(),
45
- verificationLevel: z.enum(['static-checked', 'runtime-verified']),
46
- smokeStatus: z.enum(['static-passed', 'passed', 'manual-step-required', 'failed', 'not-run']),
47
- validatedAt: z.string(),
48
- }),
49
- metrics: z.object({
50
- stars: z.number().int(),
51
- starsDelta1d: nullableInteger,
52
- forks: z.number().int(),
53
- openIssues: z.number().int(),
54
- views: z.number().int(),
55
- }),
56
- timestamps: z.object({
57
- listedAt: z.string(),
58
- lastPushedAt: z.string(),
59
- sourceUpdatedAt: z.string(),
60
- }),
61
- links: z.object({
62
- detail: z.url(),
63
- repository: z.url(),
64
- }),
65
- });
66
- const responseSchema = z.object({
67
- items: z.array(pluginSchema),
68
- pagination: z.object({
69
- page: z.number().int(),
70
- perPage: z.number().int(),
71
- total: z.number().int(),
72
- totalPages: z.number().int(),
73
- }),
74
- meta: z.object({
75
- apiVersion: z.literal('v1'),
76
- locale: z.enum(pluginHubLocales),
77
- query: z.string(),
78
- sort: z.enum(pluginHubSorts),
79
- dataUpdatedAt: z.string(),
80
- }),
81
- });
82
- const errorSchema = z.object({
83
- error: z.object({
84
- code: z.string(),
85
- message: z.string(),
86
- fields: z.record(z.string(), z.string()).optional(),
87
- }),
88
- });
1
+ import { pluginHubCategories, pluginHubLocales, pluginHubSorts, pluginHubSources, pluginHubTypes, } from './shared.js';
2
+ import { pluginHubErrorSchema, pluginHubResponseSchema, } from './schemas.js';
3
+ export * from './shared.js';
89
4
  /** An HTTP or response-validation failure returned by DSH Plugin Hub. */
90
5
  export class PluginHubApiError extends Error {
91
6
  code;
@@ -217,7 +132,7 @@ export class PluginHubClient {
217
132
  });
218
133
  }
219
134
  if (!response.ok) {
220
- const parsed = errorSchema.safeParse(payload);
135
+ const parsed = pluginHubErrorSchema.safeParse(payload);
221
136
  const code = parsed.success ? parsed.data.error.code : `HTTP_${response.status}`;
222
137
  const detail = parsed.success ? parsed.data.error.message : `HTTP ${response.status}`;
223
138
  throw new PluginHubApiError(`DSH Plugin Hub request failed: ${detail}`, {
@@ -229,7 +144,7 @@ export class PluginHubClient {
229
144
  retryAfterSeconds: rateLimit.retryAfterSeconds,
230
145
  });
231
146
  }
232
- const parsed = responseSchema.safeParse(payload);
147
+ const parsed = pluginHubResponseSchema.safeParse(payload);
233
148
  if (!parsed.success) {
234
149
  throw new PluginHubApiError('DSH Plugin Hub returned an unsupported response.', {
235
150
  code: 'INVALID_RESPONSE',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../src/api.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,GAEf,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GAGxB,MAAM,cAAc,CAAA;AAErB,cAAc,aAAa,CAAA;AAS3B,yEAAyE;AACzE,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACjC,IAAI,CAAQ;IACZ,MAAM,CAAe;IACrB,MAAM,CAAkC;IACxC,iBAAiB,CAAe;IAEzC;;;;OAIG;IACH,YAAY,OAAe,EAAE,OAM5B;QACC,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAA;QACxC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAA;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAA;QACxB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,IAAI,CAAA;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,CAAC,CAAA;QAC1D,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,iBAAiB,IAAI,IAAI,CAAA;IAC5D,CAAC;CACF;AAED;;;;GAIG;AACH,MAAM,UAAU,yBAAyB,CAAC,GAAW;IACnD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACxB,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;IACnD,CAAC;IACD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B,CAAC,kCAAkC,MAAM,EAAE,EAAE;gBACtE,IAAI;gBACJ,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,GAAG,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;oBAC5C,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;oBACtC,CAAC,CAAC,EAAE,CAAC;gBACP,iBAAiB,EAAE,SAAS,CAAC,iBAAiB;aAC/C,CAAC,CAAA;QACJ,CAAC;QAED,MAAM,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QACzD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACpB,MAAM,IAAI,iBAAiB,CAAC,kDAAkD,EAAE;gBAC9E,IAAI,EAAE,kBAAkB;gBACxB,MAAM,EAAE,QAAQ,CAAC,MAAM;gBACvB,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC,CAAA;QACJ,CAAC;QACD,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,CAAA;IACtC,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import { type ReactNode } from 'react';
2
+ import type { InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { LocaleRuntime } from '@deepseek-ai/dsh-client-locale/client';
4
+ import type { PluginHubSearchResult } from '../schemas.js';
5
+ import { type PluginHubSearchInput } from '../shared.js';
6
+ /** Registration-owned data functions and deployment facts. */
7
+ export interface PluginHubSettingsInjected {
8
+ /** The slot renderer caches this source and binds a reactive useLocale hook. */
9
+ hooks: {
10
+ locale: Pick<LocaleRuntime, 'getSnapshot' | 'subscribe'>;
11
+ };
12
+ websiteUrl: string;
13
+ search: (input: PluginHubSearchInput, signal: AbortSignal) => Promise<PluginHubSearchResult>;
14
+ }
15
+ /** Full props assembled by the Settings slot renderer. */
16
+ export type PluginHubSettingsProps = PropsRuntime<'settings.section'> & PropsLocale<'dsh.pluginHub'> & InjectFace<PluginHubSettingsInjected>;
17
+ /** Independent Settings page containing marketplace and rankings tabs. */
18
+ export declare function PluginHubSettings({ useLocale, websiteUrl, search, t }: PluginHubSettingsProps): ReactNode;
19
+ //# sourceMappingURL=PluginHubSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PluginHubSettings.d.ts","sourceRoot":"","sources":["../../src/client/PluginHubSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,SAAS,EAEf,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAC1E,OAAO,KAAK,EAAmB,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAC3E,OAAO,EAIL,KAAK,oBAAoB,EAE1B,MAAM,cAAc,CAAA;AAOrB,8DAA8D;AAC9D,MAAM,WAAW,yBAAyB;IACxC,gFAAgF;IAChF,KAAK,EAAE;QAAE,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,aAAa,GAAG,WAAW,CAAC,CAAA;KAAE,CAAA;IACnE,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,CAAC,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,qBAAqB,CAAC,CAAA;CAC7F;AAED,0DAA0D;AAC1D,MAAM,MAAM,sBAAsB,GAChC,YAAY,CAAC,kBAAkB,CAAC,GAC9B,WAAW,CAAC,eAAe,CAAC,GAC5B,UAAU,CAAC,yBAAyB,CAAC,CAAA;AA6OzC,0EAA0E;AAC1E,wBAAgB,iBAAiB,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,sBAAsB,GAAG,SAAS,CAsJzG"}