dsh-session-manager 0.4.4 → 0.4.6
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.md +119 -0
- package/lib/client.js +3 -2
- package/lib/index.js +1233 -1231
- package/package.json +4 -2
- package/scripts/heal-v2-sessions.ps1 +79 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.6 — 2026-09-05
|
|
4
|
+
|
|
5
|
+
- **fix(persistence)**: read all concatenated Zstandard frames in a session
|
|
6
|
+
artifact. DSH writes one frame for the header and additional frames for
|
|
7
|
+
event batches; reading only the first frame made sessions appear to lose
|
|
8
|
+
their event history after refresh.
|
|
9
|
+
- **fix(move)**: preserve the session generation/header version when
|
|
10
|
+
re-homing an artifact, and synchronize the live session, persistence
|
|
11
|
+
coordinator, registry indexes, and workspace accounting after a move.
|
|
12
|
+
This avoids stale-path `ENOENT` failures and v2/v0 filename/header
|
|
13
|
+
mismatches on the next DSH startup.
|
|
14
|
+
- **fix(preset migration)**: fall back to an id-based artifact scan when a
|
|
15
|
+
persistence locate result points at a stale path, and mirror cold-path
|
|
16
|
+
migrations into the live session projection.
|
|
17
|
+
- **fix(client)**: stop calling the removed/unavailable
|
|
18
|
+
`noteAgentPreset` client method; refresh the session projection instead.
|
|
19
|
+
- **recovery**: add `scripts/heal-v2-sessions.ps1` for the DSH 0.1.1-rc.2
|
|
20
|
+
boot-time quirk where `session.v2.jsonl.zstd` contains a `version: 0`
|
|
21
|
+
header. Run it before starting DSH; this repair must happen before DSH's
|
|
22
|
+
workspace initialization, which is earlier than user plugin `apply()`.
|
|
23
|
+
|
|
24
|
+
- **docs**: bump version to 0.4.6.
|
|
25
|
+
## 0.4.5 — 2026-09-05
|
|
26
|
+
|
|
27
|
+
- **fix(move)**: keep the live session and agent in place during a cross-workspace
|
|
28
|
+
move. The previous code tore down the live agent/session, moved the file, then
|
|
29
|
+
called `ctx.agents.resume` to re-create the agent. DSH's `agent/status` event
|
|
30
|
+
is only emitted on phase changes, so a freshly resumed agent never told the
|
|
31
|
+
client it was now idle, leaving the sidebar's model selector and send button
|
|
32
|
+
disabled ("会话不可用") until a manual browser refresh. The new path flushes
|
|
33
|
+
pending events to disk, updates the in-memory session header + coordinator
|
|
34
|
+
state + workspace accounting in place, and atomically renames the artifact,
|
|
35
|
+
so the agent's UI keeps showing the same in-memory session with no client
|
|
36
|
+
re-init.
|
|
37
|
+
- **fix(preset migration)**: drop the over-strict `persistence.readRaw` /
|
|
38
|
+
`persistence.list` precondition that caused the
|
|
39
|
+
`/session-manager/api/preset-scan` endpoint to fail with
|
|
40
|
+
`current persistence backend does not support readRaw/list` on a default DSH
|
|
41
|
+
build. The actual `JsonlSessionPersistence` backend exposes both methods, so
|
|
42
|
+
the precondition is replaced with a try/catch around `listSessionHeaders` that
|
|
43
|
+
converts any missing-method failure into a useful
|
|
44
|
+
`failed to enumerate sessions: <detail>` message.
|
|
45
|
+
- **chore**: remove the now-unused `quietLive` / `releaseLiveSession` helpers
|
|
46
|
+
and squash the per-route indentation noise around `/move` and `/workspaces`.
|
|
47
|
+
|
|
48
|
+
## 0.4.4 — 2026-09-03
|
|
49
|
+
|
|
50
|
+
- **docs**: rename the English README wording from `conversation` to `session` to align with the plugin name (`dsh-session-manager`), the Chinese README (`会话`), the DSH host APIs, and the [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) registry entry.
|
|
51
|
+
- **chore**: rewrite `package.json` `description` to use `Session manager` / `sessions` for the same alignment, and bump the version to `0.4.4`.
|
|
52
|
+
- **chore(repo)**: update the GitHub repository description to match.
|
|
53
|
+
|
|
54
|
+
## 0.4.3 — 2026-09-03
|
|
55
|
+
|
|
56
|
+
- **docs**: add the [Awesome DSH Plugin](https://awesome-dsh-plugin.com) badge to `README.md` / `README.zh.md` so the repo surfaces its curated registry membership.
|
|
57
|
+
|
|
58
|
+
## 0.4.2 — 2026-09-03
|
|
59
|
+
|
|
60
|
+
- **feat(theme)**: dialogs now auto-follow DSH''s dark/light theme (`data-ds-dark-theme` / ` `code-scheme` / `data-theme`) via a single `data-sm-theme` attribute and scoped CSS variables, with inline `background` / `color` / `border-color` applied to each dialog root so they stay opaque regardless of how DSH resolves its own tokens. The previous manual light/dark toggle button is removed.
|
|
61
|
+
- **docs**: aligned bilingual README structure, dropped the obsolete "no bulk migration" wording, and added an Acknowledgments section that thanks the users and the contributors filing issues and opening PRs. Listed [dsh-market](https://github.com/dsh-market/dsh-market) and [awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) as install sources.
|
|
62
|
+
- **chore**: rewrote `package.json` `description` to match the new English summary.
|
|
63
|
+
|
|
64
|
+
## 0.4.1 — 2026-08-28
|
|
65
|
+
|
|
66
|
+
- **fix(ui)**: keep the title-bar **Delete conversation** button readable on hover with a red background, white text, and red border; remove the unused legacy danger-button rules.
|
|
67
|
+
|
|
68
|
+
## 0.4.0 — 2026-08-28
|
|
69
|
+
|
|
70
|
+
- **feat(session preset migration)**: replaces the former bulk workflow with a
|
|
71
|
+
per-conversation **Migrate preset** action in Session manager. It resolves the
|
|
72
|
+
effective preset from the latest `agent-preset/selected` event or, when absent,
|
|
73
|
+
the session header, then safely updates that one conversation.
|
|
74
|
+
- **fix(lifecycle)**: moving a conversation or migrating its preset now retires stale
|
|
75
|
+
live agents and persistence owners before refresh. This prevents resume failures
|
|
76
|
+
such as `already has a live persistence owner`.
|
|
77
|
+
- **fix(move)**: refreshes session and workspace state immediately and once more after
|
|
78
|
+
the host event race, so a moved conversation reappears in its target workspace
|
|
79
|
+
without a manual browser refresh.
|
|
80
|
+
- **ui**: finalizes header actions and Session manager dialogs: red delete actions,
|
|
81
|
+
per-row preset migration, consistent dialog placement, readable hover states, and
|
|
82
|
+
a close button beside the manager title.
|
|
83
|
+
- **docs**: refreshes bilingual documentation and npm metadata for the single-session
|
|
84
|
+
preset migration workflow.
|
|
85
|
+
|
|
86
|
+
## 0.3.0 — 2026-08-27
|
|
87
|
+
|
|
88
|
+
- **feat(preset migration)**: introduced preset migration support for conversations
|
|
89
|
+
whose configured Agent preset was renamed or removed.
|
|
90
|
+
- **feat(move)**: added workspace move handling and client-side workspace refreshes.
|
|
91
|
+
|
|
92
|
+
## 0.2.1 — 2026-08-26
|
|
93
|
+
|
|
94
|
+
- **fix(move)**: reimplemented cross-workspace moves so the session artifact, stored
|
|
95
|
+
`cwd`, and workspace accounting are moved together while preserving history,
|
|
96
|
+
title, archive state, and derived-session relationships.
|
|
97
|
+
- **feat(workspaces API)**: added the workspace projection endpoint used by the move UI.
|
|
98
|
+
- **guard**: reject subagent and transient blank-session placeholders for move actions.
|
|
99
|
+
|
|
100
|
+
## 0.2.0 — 2026-08-16
|
|
101
|
+
|
|
102
|
+
> ⚠️ The initial workspace-move implementation was superseded by 0.2.1.
|
|
103
|
+
|
|
104
|
+
- **feat(move)**: added the initial move-to-workspace UI and host endpoints.
|
|
105
|
+
|
|
106
|
+
## 0.1.2 — 2026-08-16
|
|
107
|
+
|
|
108
|
+
- **docs**: synchronized package metadata and bilingual README files for publication.
|
|
109
|
+
|
|
110
|
+
## 0.1.1 — 2026-08-16
|
|
111
|
+
|
|
112
|
+
- **fix(panel)**: hide transient blank-session placeholders from the manager panel.
|
|
113
|
+
- **test**: added the host API smoke test.
|
|
114
|
+
- **ci**: added syntax and package-content verification.
|
|
115
|
+
|
|
116
|
+
## 0.1.0 — 2026-08-16
|
|
117
|
+
|
|
118
|
+
- **feat**: initial session deletion with confirmation, archive management, and the
|
|
119
|
+
Session manager panel.
|
package/lib/client.js
CHANGED
|
@@ -1074,7 +1074,9 @@ window.__ModuleLoader__.load({
|
|
|
1074
1074
|
const wasCurrent = ctx.sessions.list.getSnapshot().current === sessionId;
|
|
1075
1075
|
const response = await callApi("/preset-migrate", { sessionId, toPreset });
|
|
1076
1076
|
if (!response.ok) throw new Error(response.error || "preset migration failed");
|
|
1077
|
-
|
|
1077
|
+
// The current DSH client session store derives agentPreset from
|
|
1078
|
+
// the refreshed projection; older builds exposed noteAgentPreset,
|
|
1079
|
+
// but calling it unconditionally breaks migration on newer builds.
|
|
1078
1080
|
await ctx.sessions.refresh();
|
|
1079
1081
|
if (wasCurrent) ctx.sessions.open(sessionId);
|
|
1080
1082
|
// Host/session-removed and the HTTP response travel on different
|
|
@@ -1082,7 +1084,6 @@ window.__ModuleLoader__.load({
|
|
|
1082
1084
|
// page refresh and keeps the migrated conversation selectable.
|
|
1083
1085
|
setTimeout(() => {
|
|
1084
1086
|
void ctx.sessions.refresh().then(() => {
|
|
1085
|
-
ctx.sessions.noteAgentPreset(sessionId, toPreset);
|
|
1086
1087
|
if (wasCurrent) ctx.sessions.open(sessionId);
|
|
1087
1088
|
}).catch(() => {});
|
|
1088
1089
|
}, 250);
|