dsh-manage-session 0.5.1 → 0.5.4
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/CHANGELOG.ja.md +207 -242
- package/CHANGELOG.ko.md +207 -242
- package/CHANGELOG.md +341 -341
- package/INSTALL.ja.md +164 -179
- package/INSTALL.ko.md +164 -179
- package/INSTALL.md +164 -179
- package/INSTALL.zh.md +164 -179
- package/LICENSE +21 -21
- package/README.en.md +4 -12
- package/README.ja.md +0 -12
- package/README.ko.md +0 -12
- package/README.md +4 -14
- package/cordis.patch.yml +16 -11
- package/dsh.plugin.json +4 -4
- package/lib/client.js +3882 -690
- package/lib/index.d.ts +759 -29
- package/lib/index.js +2604 -93
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/it.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/ko.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +43 -32
- package/src/client/bridge-scope.ts +213 -0
- package/src/client/card.tsx +150 -150
- package/src/client/history-panel.tsx +319 -319
- package/src/client/index.ts +465 -354
- package/src/client/locales.ts +857 -698
- package/src/client/panel.tsx +139 -118
- package/src/client/search/card.tsx +563 -0
- package/src/client/search/host-api.ts +208 -0
- package/src/client/search/locales.ts +780 -0
- package/src/client/search/manage.tsx +400 -0
- package/src/client/search/panel.tsx +815 -0
- package/src/client/search/platform.ts +136 -0
- package/src/config.ts +82 -33
- package/src/host/health/attribution.ts +118 -118
- package/src/host/health/lossless.ts +128 -128
- package/src/host/health/source-kind.ts +350 -350
- package/src/host/history/archive-source.ts +250 -202
- package/src/host/history/archive.ts +249 -194
- package/src/host/history/favorites.ts +71 -0
- package/src/host/history/purge.ts +370 -370
- package/src/host/index/archive-source.ts +90 -0
- package/src/host/index/engine.ts +571 -0
- package/src/host/index/extract.ts +272 -0
- package/src/host/index/peers.ts +62 -0
- package/src/host/index/rebuild.ts +368 -0
- package/src/host/index/schema.ts +136 -0
- package/src/host/index/snapshot.ts +135 -0
- package/src/host/index/sync.ts +286 -0
- package/src/host/registry/archive-registry.ts +317 -0
- package/src/host/settings-bridge.ts +237 -0
- package/src/index.ts +1421 -532
- package/README.de.md +0 -120
- package/README.es.md +0 -120
- package/README.fr.md +0 -120
- package/README.it.md +0 -120
- package/README.ru.md +0 -120
package/INSTALL.md
CHANGED
|
@@ -1,179 +1,164 @@
|
|
|
1
|
-
# Installation Guide (Official DSH CLI)
|
|
2
|
-
|
|
3
|
-
This guide uses only the official DSH `dsh plugin` command. That command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, a direct `pnpm add` in the profile, or manual edits to the profile manifest.
|
|
4
|
-
|
|
5
|
-
- [English installation guide](./INSTALL.md)
|
|
6
|
-
- [中文安装指南](./INSTALL.zh.md)
|
|
7
|
-
- [日本語インストールガイド](./INSTALL.ja.md)
|
|
8
|
-
- [한국어 설치 안내](./INSTALL.ko.md)
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
13
|
-
- [
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
#
|
|
98
|
-
#
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## 8. Remove
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
dsh plugin --profile <profile> remove dsh-manage-session
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
Restart DSH afterwards.
|
|
172
|
-
|
|
173
|
-
## Removal does not undo repairs
|
|
174
|
-
|
|
175
|
-
The plugin never rewrites session logs, history data, or silently drops fields. The only irreversible-looking action it takes — quarantining a damaged projection-cache record — copies a backup first, and the quarantine directory is left on disk for you to restore from. Removing the plugin therefore leaves any quarantine you asked for in place; restore it manually if you want the state back.
|
|
176
|
-
|
|
177
|
-
## License
|
|
178
|
-
|
|
179
|
-
MIT
|
|
1
|
+
# Installation Guide (Official DSH CLI)
|
|
2
|
+
|
|
3
|
+
This guide uses only the official DSH `dsh plugin` command. That command installs the dependency into a profile and synchronizes `dsh.profile.bundles`. Do not replace it with plain `npm install`, a direct `pnpm add` in the profile, or manual edits to the profile manifest.
|
|
4
|
+
|
|
5
|
+
- [English installation guide](./INSTALL.md)
|
|
6
|
+
- [中文安装指南](./INSTALL.zh.md)
|
|
7
|
+
- [日本語インストールガイド](./INSTALL.ja.md)
|
|
8
|
+
- [한국어 설치 안내](./INSTALL.ko.md)
|
|
9
|
+
- [中文 README](./README.md)
|
|
10
|
+
- [English README](./README.en.md)
|
|
11
|
+
- [日本語 README](./README.ja.md)
|
|
12
|
+
- [한국어 README](./README.ko.md)
|
|
13
|
+
- [Changelog](./CHANGELOG.md)
|
|
14
|
+
- [日本語 changelog](./CHANGELOG.ja.md)
|
|
15
|
+
- [한국어 changelog](./CHANGELOG.ko.md)
|
|
16
|
+
|
|
17
|
+
The placeholders in this guide are:
|
|
18
|
+
|
|
19
|
+
- `<profile>`: the DSH profile to modify, usually `web`;
|
|
20
|
+
- `dsh-manage-session`: the npm package and runtime plugin ID.
|
|
21
|
+
|
|
22
|
+
> **Supported DSH range: `>=0.1.0-rc.6 <0.2.0-0`.**
|
|
23
|
+
>
|
|
24
|
+
> This is the range declared in `engines.dsh` of both `package.json` and `dsh.plugin.json`, and it matches the `^0.1.0-rc.6` floor this plugin already declares for its own `@deepseek-ai/dsh-client-ui-slots` dependency. Check the running version with `dsh --version` before installing.
|
|
25
|
+
|
|
26
|
+
## 0. Prerequisites and profile discovery
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
echo "DSH_HOME=${DSH_HOME:-$HOME/.dsh}"
|
|
30
|
+
dsh --version
|
|
31
|
+
ls "${DSH_HOME:-$HOME/.dsh}/profiles"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use the profile named by your running DSH process. `web` is common, but the active `--profile` argument is authoritative.
|
|
35
|
+
|
|
36
|
+
## 1. Official installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
dsh plugin --profile <profile> add dsh-manage-session -w
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
(the `-w` flag is required when the profile is a pnpm workspace root, as `web` is.)
|
|
43
|
+
|
|
44
|
+
Install a specific version explicitly:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dsh plugin --profile <profile> add dsh-manage-session@0.1.0-alpha.6 -w
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The official CLI updates the profile dependency, the lockfile, and `dsh.profile.bundles` automatically. Do not add a manual YAML row.
|
|
51
|
+
|
|
52
|
+
### Supply-chain cooling period
|
|
53
|
+
|
|
54
|
+
The DSH runtime uses pnpm 11, whose `minimumReleaseAge` policy may block a freshly published version with `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION`. Add the version to `minimumReleaseAgeExclude` in `~/.dsh/profiles/<profile>/pnpm-workspace.yaml`:
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
minimumReleaseAgeExclude:
|
|
58
|
+
- dsh-manage-session@0.1.0-alpha.6
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 2. Restart the host
|
|
62
|
+
|
|
63
|
+
**A DSH restart is required after installing or upgrading.** Refreshing the browser page is not enough: the host half registers the `/session-steward/api` routes and the settings namespace at startup, and the host must reload the archive source before it reflects a prune.
|
|
64
|
+
|
|
65
|
+
## 3. Upgrade
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
dsh plugin --profile <profile> update dsh-manage-session -w
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Restart DSH afterwards.
|
|
72
|
+
|
|
73
|
+
## 4. Local-path / `link:` registration (alternative)
|
|
74
|
+
|
|
75
|
+
For development or offline installs, register the plugin from a local checkout:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# ~/.dsh/profiles/<profile>/package.json dependencies:
|
|
79
|
+
# "dsh-manage-session": "link:<absolute path to dsh-manage-session>"
|
|
80
|
+
# ~/.dsh/profiles/<profile>/cordis.patch.yml:
|
|
81
|
+
# - insert:
|
|
82
|
+
# - id: dsh-manage-session
|
|
83
|
+
# name: dsh-manage-session
|
|
84
|
+
cd ~/.dsh/profiles/<profile> && pnpm install && dsh web
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Or use the official CLI with a local path (no network needed):
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
dsh plugin --profile <profile> add /absolute/path/to/dsh-manage-session -w
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Building from a source checkout uses these scripts:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pnpm install
|
|
97
|
+
pnpm typecheck # tsc -b --pretty false
|
|
98
|
+
pnpm test # vitest run
|
|
99
|
+
pnpm build # tsc -b && tsdown → lib/index.js + lib/index.d.ts + lib/client.js
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`lib/` is not committed, so a source checkout must be built before it can be registered by path. Publishing builds it automatically through the `prepublishOnly` hook.
|
|
103
|
+
|
|
104
|
+
## 5. Verify installation
|
|
105
|
+
|
|
106
|
+
Check the dependency and the installed version:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
grep -n "dsh-manage-session" \
|
|
110
|
+
"${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/package.json"
|
|
111
|
+
node -p "require('${DSH_HOME:-$HOME/.dsh}/profiles/<profile>/node_modules/dsh-manage-session/package.json').version"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Check the official composition:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
dsh --profile <profile> --dump-default-config
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
It must contain:
|
|
121
|
+
|
|
122
|
+
```yaml
|
|
123
|
+
- id: dsh-manage-session
|
|
124
|
+
name: dsh-manage-session
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 6. Verify the plugin
|
|
128
|
+
|
|
129
|
+
After the restart, the sidebar entry `dsh-manage-session` is available and the settings section uses the `session-steward` namespace. Confirm:
|
|
130
|
+
|
|
131
|
+
1. Both tabs render — **Retirement Home** and **Checkup** — while both feature gates are on.
|
|
132
|
+
2. Turning `historyFiles` off removes the Retirement Home tab and makes every `session-history-*` call return an explicit disabled error.
|
|
133
|
+
3. Turning `healthCheck` off removes the Checkup tab and makes every `session-health-*` call return an explicit disabled error.
|
|
134
|
+
4. An unrecognized method on `/session-steward/api` returns an explicit error rather than succeeding silently.
|
|
135
|
+
|
|
136
|
+
Closed domains return `{ ok: false, error: '子域已关闭(…=false):<method> 未注册' }` — the plugin does not leave empty shells behind.
|
|
137
|
+
|
|
138
|
+
## 7. Troubleshooting
|
|
139
|
+
|
|
140
|
+
| Symptom | Action |
|
|
141
|
+
| --- | --- |
|
|
142
|
+
| `dsh` is not found | Install or enable the official DSH CLI. |
|
|
143
|
+
| `ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION` | Add the version to `minimumReleaseAgeExclude` in the profile's `pnpm-workspace.yaml`. |
|
|
144
|
+
| Tabs or routes missing after install | Restart the host process — a page refresh does not re-register routes. |
|
|
145
|
+
| Changes to the archive set are not visible | Restart the host; the archive source is read at startup. |
|
|
146
|
+
| `session-history-*` returns a disabled error | The `historyFiles` gate is off. Re-enable it in the plugin settings. |
|
|
147
|
+
| `session-health-*` returns a disabled error | The `healthCheck` gate is off. Re-enable it in the plugin settings. |
|
|
148
|
+
| Stale client bundle after an upgrade | Hard-refresh the browser (Ctrl+Shift+R). |
|
|
149
|
+
|
|
150
|
+
## 8. Remove
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
dsh plugin --profile <profile> remove dsh-manage-session
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Restart DSH afterwards.
|
|
157
|
+
|
|
158
|
+
## Removal does not undo repairs
|
|
159
|
+
|
|
160
|
+
The plugin never rewrites session logs, history data, or silently drops fields. The only irreversible-looking action it takes — quarantining a damaged projection-cache record — copies a backup first, and the quarantine directory is left on disk for you to restore from. Removing the plugin therefore leaves any quarantine you asked for in place; restore it manually if you want the state back.
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
MIT
|