dsh-agent-skills 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/LICENSE +21 -0
- package/README.md +129 -0
- package/cordis.patch.yml +13 -0
- package/lib/client.js +15235 -0
- package/lib/client.js.map +7 -0
- package/lib/discovery.d.ts +9 -0
- package/lib/discovery.js +48 -0
- package/lib/discovery.js.map +1 -0
- package/lib/index.d.ts +35 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/lib/preset.d.ts +9 -0
- package/lib/preset.js +7 -0
- package/lib/preset.js.map +1 -0
- package/lib/provider.d.ts +53 -0
- package/lib/provider.js +295 -0
- package/lib/provider.js.map +1 -0
- package/lib/registry.d.ts +85 -0
- package/lib/registry.js +122 -0
- package/lib/registry.js.map +1 -0
- package/lib/runtime.d.ts +27 -0
- package/lib/runtime.js +162 -0
- package/lib/runtime.js.map +1 -0
- package/lib/scan.d.ts +29 -0
- package/lib/scan.js +156 -0
- package/lib/scan.js.map +1 -0
- package/lib/schemas.d.ts +112 -0
- package/lib/schemas.js +82 -0
- package/lib/schemas.js.map +1 -0
- package/lib/store.d.ts +26 -0
- package/lib/store.js +88 -0
- package/lib/store.js.map +1 -0
- package/lib/typert.d.ts +195 -0
- package/lib/typert.js +153 -0
- package/lib/typert.js.map +1 -0
- package/lib/types/client/AgentSkillsSection.d.ts +9 -0
- package/lib/types/client/index.d.ts +14 -0
- package/lib/types/client/locales.d.ts +86 -0
- package/lib/types/client/styles.d.ts +4 -0
- package/lib/types/client/typert-remote.d.ts +152 -0
- package/lib/types/client/types.d.ts +13 -0
- package/lib/types/schemas.d.ts +112 -0
- package/lib/views.d.ts +27 -0
- package/lib/views.js +218 -0
- package/lib/views.js.map +1 -0
- package/package.json +130 -0
- package/scripts/install-preset.mjs +49 -0
- package/scripts/uninstall-preset.mjs +22 -0
package/package.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-agent-skills",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"author": "Wei <minivv@users.noreply.github.com>",
|
|
5
|
+
"description": "Discover and manage Claude Code, Codex, Gemini CLI, and other Agent Skills inside DeepSeek Harness.",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"main": "lib/index.js",
|
|
9
|
+
"types": "lib/index.d.ts",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/minivv/dsh-agent-skills.git"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://weispot.vercel.app/projects/dsh-agent-skills",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/minivv/dsh-agent-skills/issues"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"dsh-plugin",
|
|
20
|
+
"deepseek-harness",
|
|
21
|
+
"agent-skills",
|
|
22
|
+
"skills",
|
|
23
|
+
"codex",
|
|
24
|
+
"claude-code"
|
|
25
|
+
],
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public"
|
|
28
|
+
},
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./lib/index.d.ts",
|
|
32
|
+
"default": "./lib/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./typert": {
|
|
35
|
+
"types": "./lib/typert.d.ts",
|
|
36
|
+
"default": "./lib/typert.js"
|
|
37
|
+
},
|
|
38
|
+
"./preset": {
|
|
39
|
+
"types": "./lib/preset.d.ts",
|
|
40
|
+
"default": "./lib/preset.js"
|
|
41
|
+
},
|
|
42
|
+
"./client": {
|
|
43
|
+
"types": "./lib/types/client/index.d.ts",
|
|
44
|
+
"default": "./lib/client.js"
|
|
45
|
+
},
|
|
46
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"lib",
|
|
51
|
+
"cordis.patch.yml",
|
|
52
|
+
"scripts/install-preset.mjs",
|
|
53
|
+
"scripts/uninstall-preset.mjs",
|
|
54
|
+
"README.md",
|
|
55
|
+
"LICENSE"
|
|
56
|
+
],
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20"
|
|
59
|
+
},
|
|
60
|
+
"dsh": {
|
|
61
|
+
"bundle": {
|
|
62
|
+
"patch": "./cordis.patch.yml"
|
|
63
|
+
},
|
|
64
|
+
"client": {
|
|
65
|
+
"platform": "web",
|
|
66
|
+
"inject": [
|
|
67
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
68
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
70
|
+
"@deepseek-ai/dsh-client-locale",
|
|
71
|
+
"@deepseek-ai/dsh-api-remotes"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "node scripts/build.mjs",
|
|
77
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
|
|
78
|
+
"prepare": "npm run build",
|
|
79
|
+
"prepublishOnly": "npm run typecheck && npm run build",
|
|
80
|
+
"preset": "node scripts/install-preset.mjs",
|
|
81
|
+
"preset:remove": "node scripts/uninstall-preset.mjs"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
85
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
|
|
86
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
87
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
|
|
89
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
90
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.0-rc.6",
|
|
91
|
+
"@deepseek-ai/dsh-scope": "^0.1.0-rc.6",
|
|
92
|
+
"@deepseek-ai/dsh-skill": "^0.1.0-rc.6",
|
|
93
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.6",
|
|
94
|
+
"react": "^18.2.0",
|
|
95
|
+
"react-dom": "^18.2.0",
|
|
96
|
+
"zod": "^4.0.0"
|
|
97
|
+
},
|
|
98
|
+
"peerDependenciesMeta": {
|
|
99
|
+
"react": {
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
"react-dom": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"devDependencies": {
|
|
107
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
108
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.6",
|
|
109
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.0-rc.6",
|
|
110
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.6",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
113
|
+
"@deepseek-ai/dsh-home-paths": "^0.1.0-rc.6",
|
|
114
|
+
"@deepseek-ai/dsh-scope": "^0.1.0-rc.6",
|
|
115
|
+
"@deepseek-ai/dsh-skill": "^0.1.0-rc.6",
|
|
116
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.6",
|
|
117
|
+
"@types/js-yaml": "^4.0.9",
|
|
118
|
+
"@types/node": "^22.0.0",
|
|
119
|
+
"@types/react": "~18.3.1",
|
|
120
|
+
"@types/react-dom": "~18.3.1",
|
|
121
|
+
"esbuild": "^0.25.0",
|
|
122
|
+
"react": "^18.3.1",
|
|
123
|
+
"react-dom": "^18.3.1",
|
|
124
|
+
"typescript": "^5.7.0",
|
|
125
|
+
"zod": "^4.0.0"
|
|
126
|
+
},
|
|
127
|
+
"dependencies": {
|
|
128
|
+
"js-yaml": "^4.3.1"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Idempotently append the dsh-agent-skills row to the shipped agent preset
|
|
2
|
+
// compositions (standard / code) that mount skill-filesystem, so the plugin's
|
|
3
|
+
// provider registers into the PRESET layer of the skill registry — the layer
|
|
4
|
+
// that wins for agent-visible skills. Without this row the settings page and
|
|
5
|
+
// custom directories still work, but per-skill toggles cannot shadow the
|
|
6
|
+
// preset's own filesystem provider.
|
|
7
|
+
//
|
|
8
|
+
// Usage: DSH_INSTALL_ROOT=<dsh package dir> node scripts/install-preset.mjs
|
|
9
|
+
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
|
|
12
|
+
const dshPkg = process.env.DSH_INSTALL_ROOT;
|
|
13
|
+
if (!dshPkg) {
|
|
14
|
+
console.error("DSH_INSTALL_ROOT must point at the @deepseek-ai/dsh package directory (e.g. .../lib/node_modules/@deepseek-ai/dsh)");
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
const presetRoot = join(dshPkg, "config/agent-presets");
|
|
18
|
+
if (!existsSync(join(presetRoot, "standard", "agent.cordis.yml"))) {
|
|
19
|
+
console.error("agent-presets root not found under", presetRoot);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const ROW = [
|
|
24
|
+
"",
|
|
25
|
+
"# ── dsh-agent-skills ───────────────────────────────────────────────────────",
|
|
26
|
+
"# Registered by dsh-agent-skills: provides per-skill/per-source toggles and",
|
|
27
|
+
"# custom scan directories for THIS preset layer of the skill registry.",
|
|
28
|
+
"- id: agent-skills",
|
|
29
|
+
" name: dsh-agent-skills/preset",
|
|
30
|
+
""
|
|
31
|
+
].join("\n");
|
|
32
|
+
|
|
33
|
+
let patched = 0;
|
|
34
|
+
for (const id of ["standard", "code"]) {
|
|
35
|
+
const file = join(presetRoot, id, "agent.cordis.yml");
|
|
36
|
+
if (!existsSync(file)) continue;
|
|
37
|
+
const text = readFileSync(file, "utf8");
|
|
38
|
+
const legacy = /\n?# ── dsh-agent-skills ─+\n# Registered by dsh-agent-skills:[\s\S]*?- id: agent-skills\n name: dsh-agent-skills\n?\s*$/m;
|
|
39
|
+
const current = /\n?# ── dsh-agent-skills ─+\n# Registered by dsh-agent-skills:[\s\S]*?- id: agent-skills\n name: dsh-agent-skills\/preset\n?\s*$/m;
|
|
40
|
+
if (current.test(text)) {
|
|
41
|
+
console.log("already patched:", file);
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const cleaned = text.replace(legacy, "").replace(/\s*$/, "");
|
|
45
|
+
writeFileSync(file, cleaned + ROW);
|
|
46
|
+
patched += 1;
|
|
47
|
+
console.log(legacy.test(text) ? "migrated:" : "patched:", file);
|
|
48
|
+
}
|
|
49
|
+
if (patched === 0) console.log("no preset needed patching");
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Remove only the block previously installed by dsh-agent-skills.
|
|
2
|
+
import { readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
|
|
5
|
+
const dshPkg = process.env.DSH_INSTALL_ROOT;
|
|
6
|
+
if (!dshPkg) {
|
|
7
|
+
console.error("DSH_INSTALL_ROOT must point at the @deepseek-ai/dsh package directory");
|
|
8
|
+
process.exit(1);
|
|
9
|
+
}
|
|
10
|
+
const presetRoot = join(dshPkg, "config/agent-presets");
|
|
11
|
+
let removed = 0;
|
|
12
|
+
for (const id of ["standard", "code"]) {
|
|
13
|
+
const file = join(presetRoot, id, "agent.cordis.yml");
|
|
14
|
+
if (!existsSync(file)) continue;
|
|
15
|
+
const text = readFileSync(file, "utf8");
|
|
16
|
+
const block = /\n?# ── dsh-agent-skills ─+\n# Registered by dsh-agent-skills:[\s\S]*?- id: agent-skills\n name: dsh-agent-skills(?:\/preset)?\n?\s*$/m;
|
|
17
|
+
if (!block.test(text)) continue;
|
|
18
|
+
writeFileSync(file, text.replace(block, "").replace(/\s*$/, "\n"));
|
|
19
|
+
removed += 1;
|
|
20
|
+
console.log("removed:", file);
|
|
21
|
+
}
|
|
22
|
+
if (removed === 0) console.log("no dsh-agent-skills preset rows found");
|