@cxyhhhhh/dsh-qqbot 0.1.0-dev.202608141525

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/install.sh ADDED
@@ -0,0 +1,108 @@
1
+ #!/bin/sh
2
+ # @tencent-connect/dsh-qqbot 一键安装
3
+ #
4
+ # 走 dsh CLI 的 profile 插件机制:`add` 自动初始化 profile(首层
5
+ # dsh-base),pnpm 安装后按 dsh.bundle.patch 元数据把本包追加为 bundle 层。
6
+ # 无需 DSH 源码,无需 workspace 链接。
7
+ #
8
+ # 用法:
9
+ # sh install.sh # 安装默认包最新版本
10
+ # sh install.sh --version 0.2.0 # 指定版本
11
+ # sh install.sh --pkg @myorg/my-plugin # 指定包名
12
+ # sh install.sh --pkg @myorg/my-plugin --version 1.0.0 # 指定包名+版本
13
+ # sh install.sh --registry https://registry.npmmirror.com # 指定 npm registry
14
+ set -eu
15
+
16
+ # ── 默认值 ──
17
+ PACKAGE="@tencent-connect/dsh-qqbot"
18
+ VERSION=""
19
+ REGISTRY=""
20
+ PROFILE="qqbot"
21
+
22
+ # ── 参数解析 ──
23
+ while [ $# -gt 0 ]; do
24
+ case "$1" in
25
+ --pkg)
26
+ shift; PACKAGE="$1" ;;
27
+ --pkg=*)
28
+ PACKAGE="${1#--pkg=}" ;;
29
+ --version)
30
+ shift; VERSION="$1" ;;
31
+ --version=*)
32
+ VERSION="${1#--version=}" ;;
33
+ --registry)
34
+ shift; REGISTRY="$1" ;;
35
+ --registry=*)
36
+ REGISTRY="${1#--registry=}" ;;
37
+ --profile)
38
+ shift; PROFILE="$1" ;;
39
+ --profile=*)
40
+ PROFILE="${1#--profile=}" ;;
41
+ -h|--help)
42
+ echo "用法: sh install.sh [选项]"
43
+ echo
44
+ echo "选项:"
45
+ echo " --pkg <name> 指定 npm 包名 (默认: @tencent-connect/dsh-qqbot)"
46
+ echo " --version <ver> 指定包版本 (默认: latest)"
47
+ echo " --registry <url> 指定 npm registry"
48
+ echo " --profile <name> 指定 dsh profile 名 (默认: qqbot)"
49
+ echo " -h, --help 显示帮助"
50
+ exit 0
51
+ ;;
52
+ *)
53
+ echo "未知参数: $1 (使用 --help 查看用法)" >&2
54
+ exit 1
55
+ ;;
56
+ esac
57
+ shift
58
+ done
59
+
60
+ # ── 预检 ──
61
+ if ! command -v dsh >/dev/null 2>&1; then
62
+ echo "未检测到 dsh CLI。先安装:" >&2
63
+ echo " npm install -g @deepseek-ai/dsh" >&2
64
+ exit 1
65
+ fi
66
+
67
+ if ! command -v pnpm >/dev/null 2>&1; then
68
+ echo "未检测到 pnpm。dsh plugin 依赖 pnpm,请先安装:" >&2
69
+ echo " npm install -g pnpm" >&2
70
+ exit 1
71
+ fi
72
+
73
+ # ── 构造安装标识 ──
74
+ INSTALL_SPEC="$PACKAGE"
75
+ if [ -n "$VERSION" ]; then
76
+ INSTALL_SPEC="${PACKAGE}@${VERSION}"
77
+ fi
78
+
79
+ REGISTRY_ARG=""
80
+ if [ -n "$REGISTRY" ]; then
81
+ REGISTRY_ARG="--registry ${REGISTRY}"
82
+ fi
83
+
84
+ # ── 安装 ──
85
+ echo "=================================================="
86
+ echo " 安装 QQ Bot 插件到 dsh"
87
+ echo "=================================================="
88
+ echo
89
+ echo " 包名: ${INSTALL_SPEC}"
90
+ echo " Profile: ${PROFILE}"
91
+ [ -n "$REGISTRY" ] && echo " Registry: ${REGISTRY}"
92
+ echo
93
+
94
+ dsh plugin --profile "$PROFILE" add "$INSTALL_SPEC" $REGISTRY_ARG
95
+
96
+ echo
97
+ echo "=================================================="
98
+ echo " 安装完成"
99
+ echo "=================================================="
100
+ echo
101
+ echo "配置环境变量:"
102
+ echo " export QQBOT_APPID=\"你的AppID\""
103
+ echo " export QQBOT_SECRET=\"你的AppSecret\""
104
+ echo " export DEEPSEEK_API_KEY=\"你的API Key\""
105
+ echo
106
+ echo "启动:"
107
+ echo " dsh --profile ${PROFILE}"
108
+ echo
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@cxyhhhhh/dsh-qqbot",
3
+ "version": "0.1.0-dev.202608141525",
4
+ "description": "QQ Bot IM channel plugin for deepseek-harness (dsh)",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "dev": "tsc --watch",
17
+ "prepublishOnly": "npm run build",
18
+ "lint": "eslint src/",
19
+ "clean": "rm -rf dist"
20
+ },
21
+ "keywords": [
22
+ "deepseek-harness",
23
+ "dsh",
24
+ "qqbot",
25
+ "cordis",
26
+ "plugin"
27
+ ],
28
+ "license": "MIT",
29
+ "dsh": {
30
+ "bundle": {
31
+ "patch": "./cordis.patch.yml"
32
+ }
33
+ },
34
+ "dependencies": {
35
+ "@tencent-connect/qqbot-nodejs": "^1.0.4"
36
+ },
37
+ "peerDependencies": {
38
+ "@deepseek-ai/cordis": ">=4.0.1",
39
+ "@deepseek-ai/dsh-agent": ">=0.1.0-rc.6",
40
+ "@deepseek-ai/dsh-llm": ">=0.1.0-rc.6",
41
+ "@deepseek-ai/dsh-session": ">=0.1.0-rc.6",
42
+ "@deepseek-ai/schemastery": ">=3.18.1"
43
+ },
44
+ "peerDependenciesMeta": {
45
+ "@deepseek-ai/cordis": {
46
+ "optional": false
47
+ },
48
+ "@deepseek-ai/schemastery": {
49
+ "optional": false
50
+ },
51
+ "@deepseek-ai/dsh-agent": {
52
+ "optional": false
53
+ },
54
+ "@deepseek-ai/dsh-session": {
55
+ "optional": false
56
+ },
57
+ "@deepseek-ai/dsh-llm": {
58
+ "optional": false
59
+ }
60
+ },
61
+ "devDependencies": {
62
+ "@deepseek-ai/cordis": "4.0.1",
63
+ "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
64
+ "@deepseek-ai/dsh-llm": "0.1.0-rc.6",
65
+ "@deepseek-ai/dsh-session": "0.1.0-rc.6",
66
+ "@deepseek-ai/schemastery": "3.18.1",
67
+ "@types/node": "^26.2.0",
68
+ "typescript": "^5.5.0"
69
+ }
70
+ }
@@ -0,0 +1,16 @@
1
+ allowBuilds:
2
+ esbuild: true
3
+ minimumReleaseAgeExclude:
4
+ - '@deepseek-ai/cordis@4.0.1'
5
+ - '@deepseek-ai/cosmokit@1.8.2'
6
+ - '@deepseek-ai/dsh-agent@0.1.0-rc.6'
7
+ - '@deepseek-ai/dsh-attachment@0.1.0-rc.6'
8
+ - '@deepseek-ai/dsh-brand@0.1.0-rc.6'
9
+ - '@deepseek-ai/dsh-invariants@0.1.0-rc.6'
10
+ - '@deepseek-ai/dsh-llm@0.1.0-rc.6'
11
+ - '@deepseek-ai/dsh-scope@0.1.0-rc.6'
12
+ - '@deepseek-ai/dsh-session@0.1.0-rc.6'
13
+ - '@deepseek-ai/dsh-system-prompt@0.1.0-rc.6'
14
+ - '@deepseek-ai/dsh-timeout@0.1.0-rc.6'
15
+ - '@deepseek-ai/dsh-typert-protocol@0.1.0-rc.6'
16
+ - '@deepseek-ai/schemastery@3.18.1'