dsh-vpn 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/lib/skill.js ADDED
@@ -0,0 +1,54 @@
1
+ import { createRequire as __dshVpnCreateRequire } from 'node:module';
2
+ import { dirname as __dshVpnDirname } from 'node:path';
3
+ import { fileURLToPath as __dshVpnFileURLToPath } from 'node:url';
4
+ const require = __dshVpnCreateRequire(import.meta.url);
5
+ const __filename = __dshVpnFileURLToPath(import.meta.url);
6
+ const __dirname = __dshVpnDirname(__filename);
7
+
8
+ // src/skill.ts
9
+ import { readFile } from "node:fs/promises";
10
+ import { fileURLToPath } from "node:url";
11
+ import {
12
+ BUNDLED_SKILL_RANK
13
+ } from "@deepseek-ai/dsh-skill";
14
+ var PROVIDER_NAME = "dsh-vpn";
15
+ var SKILL_BODY_URL = new URL("../assets/vpn-ops.md", import.meta.url);
16
+ var RESOURCE_BASE = {
17
+ kind: "directory",
18
+ path: fileURLToPath(new URL("../assets/", import.meta.url))
19
+ };
20
+ var CANDIDATE = {
21
+ name: "vpn-ops",
22
+ description: "Deploy, inspect and troubleshoot a personal sing-box proxy (VLESS-Reality + Hysteria2) on a VPS over ssh. Use when the user wants to set up a VPN/proxy node on a server, get node links, or fix a node that stopped working.",
23
+ invocation: { modelInvocable: true, userInvocable: true },
24
+ provider: PROVIDER_NAME,
25
+ source: "bundled",
26
+ resourceBase: RESOURCE_BASE,
27
+ rank: BUNDLED_SKILL_RANK,
28
+ locator: SKILL_BODY_URL
29
+ };
30
+ var provider = {
31
+ name: PROVIDER_NAME,
32
+ list: () => Promise.resolve([CANDIDATE]),
33
+ async get() {
34
+ return {
35
+ name: CANDIDATE.name,
36
+ description: CANDIDATE.description,
37
+ invocation: CANDIDATE.invocation,
38
+ provider: CANDIDATE.provider,
39
+ source: CANDIDATE.source,
40
+ resourceBase: RESOURCE_BASE,
41
+ content: await readFile(SKILL_BODY_URL, "utf8")
42
+ };
43
+ }
44
+ };
45
+ var name = "dsh-vpn-skill";
46
+ var inject = ["skills"];
47
+ function apply(ctx) {
48
+ ctx.skills.registerProvider(() => provider);
49
+ }
50
+ export {
51
+ apply,
52
+ inject,
53
+ name
54
+ };
package/package.json ADDED
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "dsh-vpn",
3
+ "version": "0.1.0",
4
+ "description": "DeepSeek Harness plugin: one-click sing-box deployment to a VPS over SSH, with a settings page and QR codes",
5
+ "keywords": [
6
+ "dsh-plugin",
7
+ "sing-box",
8
+ "reality",
9
+ "hysteria2",
10
+ "tuic",
11
+ "anytls",
12
+ "shadowsocks",
13
+ "vpn"
14
+ ],
15
+ "license": "MIT",
16
+ "author": "AIcivilization",
17
+ "homepage": "https://github.com/AIcivilization/dsh-vpn#readme",
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/AIcivilization/dsh-vpn.git"
21
+ },
22
+ "bugs": {
23
+ "url": "https://github.com/AIcivilization/dsh-vpn/issues"
24
+ },
25
+ "type": "module",
26
+ "main": "lib/index.js",
27
+ "exports": {
28
+ ".": "./lib/index.js",
29
+ "./skill": "./lib/skill.js",
30
+ "./client": "./lib/client.js"
31
+ },
32
+ "files": [
33
+ "lib",
34
+ "scripts/vpn.sh",
35
+ "assets",
36
+ "cordis.patch.yml",
37
+ "THIRD_PARTY_NOTICES.md"
38
+ ],
39
+ "dsh": {
40
+ "bundle": {
41
+ "patch": "./cordis.patch.yml"
42
+ },
43
+ "client": {
44
+ "platform": "web",
45
+ "inject": [
46
+ "@deepseek-ai/dsh-client-locale",
47
+ "@deepseek-ai/dsh-client-ui-plugin-manager"
48
+ ]
49
+ }
50
+ },
51
+ "engines": {
52
+ "node": ">=22"
53
+ },
54
+ "packageManager": "pnpm@11.9.0",
55
+ "publishConfig": {
56
+ "access": "public",
57
+ "provenance": true
58
+ },
59
+ "scripts": {
60
+ "build": "node scripts/build.mjs",
61
+ "typecheck": "node scripts/typecheck-dsh.mjs",
62
+ "lint:sh": "shellcheck scripts/vpn.sh",
63
+ "test": "vitest run",
64
+ "test:e2e": "vitest run -c vitest.e2e.config.ts",
65
+ "prepublishOnly": "pnpm build"
66
+ },
67
+ "peerDependencies": {
68
+ "@deepseek-ai/cordis": "*",
69
+ "@deepseek-ai/dsh-credentials": "*",
70
+ "@deepseek-ai/dsh-skill": "*",
71
+ "@deepseek-ai/dsh-tools": "*",
72
+ "@deepseek-ai/schemastery": "*"
73
+ },
74
+ "devDependencies": {
75
+ "@types/node": "^22.0.0",
76
+ "@types/react": "~18.3.31",
77
+ "@types/ssh2": "^1.15.6",
78
+ "esbuild": "^0.28.2",
79
+ "ssh2": "^1.17.0",
80
+ "typescript": "^5.6.0",
81
+ "uqr": "^0.1.3",
82
+ "vitest": "^4.1.11"
83
+ }
84
+ }