@funniki/dsh-session-toolkit 0.1.1 → 0.1.3
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,86 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# Installs the pack into one DSH profile — POSIX counterpart of install.ps1.
|
|
3
|
+
#
|
|
4
|
+
# Since 0.1.1 the pack declares the five components as its own dependencies, and
|
|
5
|
+
# DSH profiles install with `nodeLinker: hoisted`, so the components land at the
|
|
6
|
+
# profile ROOT — exactly where a bundle row resolves its `name`. Installing the
|
|
7
|
+
# pack alone is therefore enough; this script only verifies that, and falls back
|
|
8
|
+
# to adding a component explicitly when a profile is not hoisted.
|
|
9
|
+
#
|
|
10
|
+
# Usage:
|
|
11
|
+
# sh install.sh # profile "desktop"
|
|
12
|
+
# DSH_PROFILE=web sh install.sh # another profile
|
|
13
|
+
# DSH_BIN=/path/to/dsh sh install.sh
|
|
14
|
+
set -eu
|
|
15
|
+
|
|
16
|
+
PROFILE="${DSH_PROFILE:-desktop}"
|
|
17
|
+
PACK="@funniki/dsh-session-toolkit"
|
|
18
|
+
COMPONENTS="@funniki/dsh-session-toolkit-archived-session-delete
|
|
19
|
+
@funniki/dsh-session-toolkit-session-move
|
|
20
|
+
@funniki/dsh-session-toolkit-unsent-content-guard
|
|
21
|
+
@funniki/dsh-session-toolkit-session-history-search
|
|
22
|
+
@funniki/dsh-session-toolkit-auto-paste"
|
|
23
|
+
|
|
24
|
+
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
25
|
+
|
|
26
|
+
if [ -n "${DSH_BIN:-}" ]; then
|
|
27
|
+
dsh="$DSH_BIN"
|
|
28
|
+
elif command -v dsh >/dev/null 2>&1; then
|
|
29
|
+
dsh=$(command -v dsh)
|
|
30
|
+
else
|
|
31
|
+
printf 'error: the dsh CLI was not found on PATH.\n' >&2
|
|
32
|
+
printf 'Install DeepSeek Harness, or run this script with DSH_BIN=/path/to/dsh.\n' >&2
|
|
33
|
+
exit 1
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
add() {
|
|
37
|
+
printf 'Adding %s\n' "$1"
|
|
38
|
+
"$dsh" plugin --profile "$PROFILE" add "$1"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# The pack: this folder when it is the extracted zip, the registry otherwise.
|
|
42
|
+
if [ -f "$script_dir/cordis.patch.yml" ] && [ -f "$script_dir/package.json" ]; then
|
|
43
|
+
add "$script_dir"
|
|
44
|
+
else
|
|
45
|
+
add "$PACK"
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
dsh_home="${DSH_HOME:-$HOME/.dsh}"
|
|
49
|
+
profile_dir="$dsh_home/profiles/$PROFILE"
|
|
50
|
+
node_modules="$profile_dir/node_modules"
|
|
51
|
+
|
|
52
|
+
if [ ! -f "$profile_dir/package.json" ]; then
|
|
53
|
+
printf 'error: profile "%s" has no package.json (%s)\n' "$PROFILE" "$profile_dir" >&2
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# Did all five rows land where the loader looks for them?
|
|
58
|
+
missing=""
|
|
59
|
+
for component in $COMPONENTS; do
|
|
60
|
+
if [ ! -d "$node_modules/$component" ]; then
|
|
61
|
+
missing="$missing $component"
|
|
62
|
+
fi
|
|
63
|
+
done
|
|
64
|
+
|
|
65
|
+
# Fallback for a profile that is not using the hoisted linker.
|
|
66
|
+
if [ -n "$missing" ]; then
|
|
67
|
+
printf '\nThese components did not arrive with the pack (profile is not hoisted):\n'
|
|
68
|
+
for component in $missing; do printf ' %s\n' "$component"; done
|
|
69
|
+
for component in $missing; do
|
|
70
|
+
add "$component"
|
|
71
|
+
done
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# The pack must be registered as a bundle, and no Harness core copy may appear.
|
|
75
|
+
if ! grep -q '@funniki/dsh-session-toolkit' "$profile_dir/package.json"; then
|
|
76
|
+
printf 'error: the profile did not record the pack as a bundle.\n' >&2
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
if [ -e "$node_modules/@deepseek-ai/dsh-tools" ]; then
|
|
80
|
+
printf 'error: duplicate Harness core at %s — remove it before starting DSH.\n' \
|
|
81
|
+
"$node_modules/@deepseek-ai/dsh-tools" >&2
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
printf '\nInstalled %s and its five components into profile "%s".\n' "$PACK" "$PROFILE"
|
|
86
|
+
printf 'Restart DSH, or disable and re-enable the bundle in Plugins if it is already running.\n'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funniki/dsh-session-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Handier Session management: delete archived Sessions, move a Session to another Workspace, back up unsent composer text and images, and search past messages by keyword (Chinese supported).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "funniki",
|
|
@@ -23,21 +23,26 @@
|
|
|
23
23
|
"install.ps1",
|
|
24
24
|
"locale/*.json",
|
|
25
25
|
"icon.svg",
|
|
26
|
-
"安装说明.md"
|
|
26
|
+
"安装说明.md",
|
|
27
|
+
"install.sh"
|
|
27
28
|
],
|
|
28
29
|
"publishConfig": {
|
|
29
30
|
"access": "public"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@funniki/dsh-session-toolkit-archived-session-delete": "^0.1.
|
|
33
|
-
"@funniki/dsh-session-toolkit-auto-paste": "^0.1.
|
|
34
|
-
"@funniki/dsh-session-toolkit-session-history-search": "^0.1.
|
|
35
|
-
"@funniki/dsh-session-toolkit-session-move": "^0.1.
|
|
36
|
-
"@funniki/dsh-session-toolkit-unsent-content-guard": "^0.1.
|
|
33
|
+
"@funniki/dsh-session-toolkit-archived-session-delete": "^0.1.3",
|
|
34
|
+
"@funniki/dsh-session-toolkit-auto-paste": "^0.1.3",
|
|
35
|
+
"@funniki/dsh-session-toolkit-session-history-search": "^0.1.3",
|
|
36
|
+
"@funniki/dsh-session-toolkit-session-move": "^0.1.3",
|
|
37
|
+
"@funniki/dsh-session-toolkit-unsent-content-guard": "^0.1.3"
|
|
37
38
|
},
|
|
38
39
|
"dsh": {
|
|
39
40
|
"bundle": {
|
|
40
41
|
"patch": "./cordis.patch.yml"
|
|
41
42
|
}
|
|
43
|
+
},
|
|
44
|
+
"engines": {
|
|
45
|
+
"dsh": ">=0.2.1-rc.5 <0.3.0",
|
|
46
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
42
47
|
}
|
|
43
48
|
}
|
|
@@ -26,21 +26,28 @@ ERR_MODULE_NOT_FOUND: Cannot find package '@funniki/dsh-session-toolkit-archived
|
|
|
26
26
|
## 系统要求
|
|
27
27
|
|
|
28
28
|
- DeepSeek Harness 桌面端,版本 `>= 0.2.0`(0.2.1-rc.5 已验证)
|
|
29
|
-
- Windows PowerShell 5.1
|
|
29
|
+
- Windows 用 PowerShell 5.1+(`install.ps1`);macOS / Linux 用任意 POSIX `sh`(`install.sh`)
|
|
30
30
|
- 无需 Node、无需构建;五个组件已随包内 `node_modules/@funniki/` 带好,
|
|
31
31
|
组件自身零第三方依赖,包内不再有 `@deepseek-ai/*` 依赖树
|
|
32
32
|
|
|
33
33
|
## 推荐安装(zip 渠道)
|
|
34
34
|
|
|
35
|
-
1.
|
|
36
|
-
`C:\Users\<你>\dsh-plugins\dsh-session-toolkit-0.1.0`
|
|
35
|
+
1. 把压缩包解压到固定目录(例如 `~/dsh-plugins/dsh-session-toolkit-<版本>`)。
|
|
37
36
|
> DSH 以链接方式安装本地目录;安装后不要移动或删除这个目录。
|
|
38
|
-
2.
|
|
37
|
+
2. 在解压目录运行(两个脚本等价,按平台选一个):
|
|
39
38
|
|
|
40
39
|
```powershell
|
|
40
|
+
# Windows
|
|
41
41
|
powershell -ExecutionPolicy Bypass -File .\install.ps1
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
```sh
|
|
45
|
+
# macOS / Linux
|
|
46
|
+
sh ./install.sh
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
找不到 `dsh` 时:`DSH_BIN=/path/to/dsh sh ./install.sh`。
|
|
50
|
+
|
|
44
51
|
3. 重启 DSH,或在插件页先把「会话功能增强」关闭再打开。
|
|
45
52
|
4. 打开「插件 → 会话功能增强」,确认:
|
|
46
53
|
|