dshbase-catalog 0.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/cordis.patch.yml +8 -0
- package/dist/catalog.json +1243 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +52 -0
- package/package.json +29 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { defineTool } from '@deepseek-ai/dsh-tools';
|
|
2
|
+
import catalog from './catalog.json' with { type: 'json' };
|
|
3
|
+
export const name = 'dshbase-catalog';
|
|
4
|
+
export const inject = ['tools'];
|
|
5
|
+
const plugins = catalog.plugins || [];
|
|
6
|
+
function text(v) {
|
|
7
|
+
return [{ type: 'text', text: v }];
|
|
8
|
+
}
|
|
9
|
+
export function apply(ctx) {
|
|
10
|
+
ctx.tools.register(defineTool({
|
|
11
|
+
name: 'search_dsh_plugins',
|
|
12
|
+
description: 'Search the dshbase plugin directory for DeepSeek Harness plugins. Pass a keyword to match against plugin name, category, or description. Returns matching plugins with their install command and test status.',
|
|
13
|
+
parameters: {
|
|
14
|
+
query: { type: 'string', required: true, description: 'Keyword to search (e.g. "memory", "terminal", "ui")' },
|
|
15
|
+
limit: { type: 'string', description: 'Max results (default 10)' },
|
|
16
|
+
},
|
|
17
|
+
output: {
|
|
18
|
+
schema: { type: 'string' },
|
|
19
|
+
render: (_a, v) => text(v),
|
|
20
|
+
},
|
|
21
|
+
async execute(args) {
|
|
22
|
+
const q = (args.query || '').toLowerCase();
|
|
23
|
+
const lim = parseInt(args.limit || '10', 10) || 10;
|
|
24
|
+
const hits = plugins.filter((p) => !q ||
|
|
25
|
+
(p.name || '').toLowerCase().includes(q) ||
|
|
26
|
+
(p.category || '').toLowerCase().includes(q) ||
|
|
27
|
+
(p.desc || '').toLowerCase().includes(q) ||
|
|
28
|
+
(p.desc_zh || '').toLowerCase().includes(q)).slice(0, lim);
|
|
29
|
+
if (!hits.length)
|
|
30
|
+
return `No plugins matched "${args.query}". Try a broader keyword.`;
|
|
31
|
+
const lines = hits.map((p, i) => `${i + 1}. ${p.name} [${p.test}] ★${p.stars || 0}\n ${p.desc}\n Install: ${p.install}`);
|
|
32
|
+
return `Found ${hits.length} plugins (of ${plugins.length} total):\n\n${lines.join('\n\n')}`;
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
ctx.tools.register(defineTool({
|
|
36
|
+
name: 'get_dsh_plugin',
|
|
37
|
+
description: 'Get details and the exact install command for a specific DeepSeek Harness plugin from the dshbase directory.',
|
|
38
|
+
parameters: {
|
|
39
|
+
name: { type: 'string', required: true, description: 'Plugin name (e.g. "dsh-memory")' },
|
|
40
|
+
},
|
|
41
|
+
output: {
|
|
42
|
+
schema: { type: 'string' },
|
|
43
|
+
render: (_a, v) => text(v),
|
|
44
|
+
},
|
|
45
|
+
async execute(args) {
|
|
46
|
+
const p = plugins.find((x) => x.name === args.name);
|
|
47
|
+
if (!p)
|
|
48
|
+
return `Plugin "${args.name}" not found. Use search_dsh_plugins to find it.`;
|
|
49
|
+
return `${p.name} (${p.category})\nStatus: ${p.test} · Stars: ${p.stars || 0}\n${p.desc}\n\nInstall:\n ${p.install}\n\nMore: ${p.url}`;
|
|
50
|
+
},
|
|
51
|
+
}));
|
|
52
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dshbase-catalog",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Search the dshbase plugin directory from inside DeepSeek Harness — find plugins by keyword, get install commands and test status.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"cordis.patch.yml"
|
|
11
|
+
],
|
|
12
|
+
"dsh": {
|
|
13
|
+
"bundle": {
|
|
14
|
+
"patch": "./cordis.patch.yml"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"keywords": ["dsh-plugin", "deepseek-harness", "plugin-directory", "catalog"],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
21
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.0.0"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc"
|
|
28
|
+
}
|
|
29
|
+
}
|