dsh-plugin-discovery 0.0.0-stage → 1.1.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.
package/locale/en.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "meta": {
3
+ "title": "Discover DSH plugins",
4
+ "description": "Curated recommendations and categories for community DSH bundles; also search GitHub/npm to install."
5
+ },
6
+ "panel": "Discover",
7
+ "searchPlaceholder": "Keywords, e.g. pet, wallpaper, dsh",
8
+ "search": "Search",
9
+ "searching": "Searching…",
10
+ "sourceAll": "All",
11
+ "sourceNpm": "npm",
12
+ "sourceGithub": "GitHub",
13
+ "browseRecommend": "For you",
14
+ "browseCategory": "Categories",
15
+ "browseSearch": "Online search",
16
+ "warning": "Community plugins are not official; review the repo before installing.",
17
+ "noResults": "No DSH bundles matched.",
18
+ "install": "Install",
19
+ "installing": "Installing…",
20
+ "inspectFailed": "Inspect failed",
21
+ "bundle": "Bundle",
22
+ "spec": "Install spec",
23
+ "resolvePlaceholder": "Paste npm or GitHub URL",
24
+ "resolve": "Resolve"
25
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "meta": {
3
+ "title": "发现 DSH 插件",
4
+ "description": "精选推荐与分类浏览社区 DSH Bundle,也可在 GitHub / npm 搜索并安装。"
5
+ },
6
+ "panel": "发现插件",
7
+ "searchPlaceholder": "搜索关键词,例如 桌宠、壁纸、dsh",
8
+ "search": "搜索",
9
+ "searching": "搜索中…",
10
+ "sourceAll": "全部",
11
+ "sourceNpm": "npm",
12
+ "sourceGithub": "GitHub",
13
+ "browseRecommend": "为你推荐",
14
+ "browseCategory": "分类浏览",
15
+ "browseSearch": "在线搜索",
16
+ "warning": "社区插件非 DeepSeek 官方维护,安装前请自行审阅仓库与权限。",
17
+ "noResults": "未找到符合条件的 DSH Bundle。",
18
+ "install": "安装",
19
+ "installing": "安装中…",
20
+ "inspectFailed": "无法校验",
21
+ "bundle": "Bundle",
22
+ "spec": "安装 spec",
23
+ "resolvePlaceholder": "粘贴 npm 或 GitHub 链接",
24
+ "resolve": "解析并校验"
25
+ }
package/mark-remote.js ADDED
@@ -0,0 +1,48 @@
1
+ /** Mark Typert Remote methods on a service prototype (plain JS, no TS decorators). */
2
+ const REMOTE_METHOD_DESCRIPTOR = "@deepseek-ai/dsh-typert-protocol/remote-methods";
3
+
4
+ function readRemoteMethodDescriptor(prototype) {
5
+ const property = Object.getOwnPropertyDescriptor(prototype, REMOTE_METHOD_DESCRIPTOR);
6
+ if (property === undefined) return undefined;
7
+ const descriptor = property.value;
8
+ if (descriptor === null || typeof descriptor !== "object") {
9
+ throw new TypeError("typert-protocol: Remote method descriptor must be an object");
10
+ }
11
+ if (Reflect.get(descriptor, "version") !== 1) {
12
+ throw new TypeError("typert-protocol: unsupported Remote method descriptor version");
13
+ }
14
+ const methods = Reflect.get(descriptor, "methods");
15
+ if (!Array.isArray(methods)) {
16
+ throw new TypeError("typert-protocol: Remote method descriptor methods must be an array");
17
+ }
18
+ return descriptor;
19
+ }
20
+
21
+ export function markRemoteMethod(prototype, method, exportName = method) {
22
+ const invocation = Object.freeze({ kind: "direct" });
23
+ const descriptor = readRemoteMethodDescriptor(prototype);
24
+ const marker = Object.freeze({
25
+ method,
26
+ ...(exportName === method ? {} : { exportName }),
27
+ invocation,
28
+ });
29
+ const current = descriptor?.methods.find((candidate) => candidate.method === method);
30
+ if (current !== undefined) {
31
+ if (
32
+ current.exportName === marker.exportName &&
33
+ current.mode === marker.mode &&
34
+ current.invocation.kind === "direct" &&
35
+ invocation.kind === "direct"
36
+ ) {
37
+ return;
38
+ }
39
+ throw new Error(`typert-protocol: Remote method "${method}" has conflicting invocation markers`);
40
+ }
41
+ Object.defineProperty(prototype, REMOTE_METHOD_DESCRIPTOR, {
42
+ configurable: true,
43
+ value: Object.freeze({
44
+ version: 1,
45
+ methods: Object.freeze([...(descriptor?.methods ?? []), marker]),
46
+ }),
47
+ });
48
+ }
package/package.json CHANGED
@@ -1,6 +1,74 @@
1
1
  {
2
2
  "name": "dsh-plugin-discovery",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.1.0",
4
+ "type": "module",
5
+ "description": "Discover and install community DSH bundles from the sidebar: newbie essentials, personalized recommendations, categories, and npm/GitHub search.",
6
+ "author": "hjhcos",
7
+ "license": "MIT",
8
+ "keywords": [
9
+ "dsh",
10
+ "dsh-plugin",
11
+ "deepseek",
12
+ "deepseek-harness",
13
+ "plugin",
14
+ "bundle",
15
+ "discovery",
16
+ "marketplace",
17
+ "recommend"
18
+ ],
19
+ "homepage": "https://github.com/hjhcos/dsh-plugin-discovery#readme",
20
+ "bugs": {
21
+ "url": "https://github.com/hjhcos/dsh-plugin-discovery/issues"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/hjhcos/dsh-plugin-discovery.git"
26
+ },
27
+ "icon": "./icon.svg",
28
+ "exports": {
29
+ ".": "./index.js",
30
+ "./client": "./client.js",
31
+ "./package.json": "./package.json",
32
+ "./locale/*.json": "./locale/*.json"
33
+ },
34
+ "files": [
35
+ "index.js",
36
+ "mark-remote.js",
37
+ "client.js",
38
+ "cordis.patch.yml",
39
+ "icon.svg",
40
+ "data",
41
+ "locale",
42
+ "skill",
43
+ "docs",
44
+ "LICENSE",
45
+ "README.md"
46
+ ],
47
+ "dependencies": {
48
+ "@deepseek-ai/cordis": "~4.0.4",
49
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
50
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
51
+ "@deepseek-ai/schemastery": "~3.18.4"
52
+ },
53
+ "peerDependencies": {
54
+ "@deepseek-ai/cordis": "~4.0.4",
55
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
56
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
57
+ "@deepseek-ai/schemastery": "*"
58
+ },
59
+ "dsh": {
60
+ "bundle": {
61
+ "patch": "./cordis.patch.yml"
62
+ },
63
+ "client": {
64
+ "platform": "web",
65
+ "immediately": false,
66
+ "inject": [
67
+ "@deepseek-ai/dsh-client-ui-sidebar",
68
+ "@deepseek-ai/dsh-client-ui-layout",
69
+ "@deepseek-ai/dsh-client-locale",
70
+ "@deepseek-ai/dsh-api-remotes"
71
+ ]
72
+ }
73
+ }
74
+ }
package/skill/SKILL.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: dsh-plugin-discovery
3
+ description: >
4
+ 当用户要在网上找 DSH 社区插件(桌宠、壁纸、非官方 bundle 等):使用 dsh-plugin-discovery。
5
+ 支持内置精选推荐/分类浏览(data/recommended.json),也可 GitHub/npm 联网搜索,
6
+ 用 pluginManager.inspect 校验 bundle 后再 installBundle 安装。
7
+ ---
8
+
9
+ # 发现插件(dsh-plugin-discovery)
10
+
11
+ ## 何时使用
12
+
13
+ 用户想找 / 安装非官方 DSH 社区 Bundle(例如桌宠、主题、工具类插件)时使用本能力。
14
+
15
+ ## 步骤
16
+
17
+ 1. 安装 bundle:`dsh-plugin-discovery`(npm)或 `github:hjhcos/dsh-plugin-discovery`。
18
+ 2. 优先看「为你推荐 / 分类浏览」(本地精选目录);需要更多结果再用关键词搜索或解析完整链接。
19
+ 3. 可用 agent 工具 `plugin_discovery_catalog` / `plugin_discovery_search`。
20
+ 4. 仅当 `inspect` 表明 `bundle: true` 时再 `installBundle`;UI 的安装按钮已走同一流程。
21
+ 5. 安装完成后引导用户到「插件」页确认状态。
22
+
23
+ ## 注意
24
+
25
+ - 社区插件非官方维护,安装前应提示用户自行审阅仓库。
26
+ - 不同来源的同名短包(如 `dsh-pet` 与 `@scope/dsh-pet`)按精确包名区分安装态。
27
+ - 精选目录在 `data/recommended.json`,随包装发,其他用户安装后即可看到。