dsh-session-rollover 0.0.0-stage → 1.1.1
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 +20 -0
- package/LICENSE +201 -0
- package/LICENSE.upstream +21 -0
- package/NOTICE +9 -0
- package/README.md +155 -2
- package/assets/icon.png +0 -0
- package/assets/icon.svg +7 -0
- package/client.js +629 -0
- package/cordis.patch.yml +9 -0
- package/docs/DETAIL.md +44 -0
- package/docs/DETAIL.zh-CN.md +49 -0
- package/docs/DEVELOPMENT.md +101 -0
- package/docs/PUBLISHING.md +63 -0
- package/docs/architecture.md +71 -0
- package/docs/live-host-validation.json +37 -0
- package/docs/marketplace-validation.md +22 -0
- package/docs/prototype-validation.json +10 -0
- package/docs/r3-demo.html +981 -0
- package/docs/r3-validation.md +59 -0
- package/docs/screenshots/help-dark.png +0 -0
- package/docs/screenshots/help-light.png +0 -0
- package/docs/screenshots/host-archived.png +0 -0
- package/docs/screenshots/host-dark.png +0 -0
- package/docs/screenshots/host-rollover.png +0 -0
- package/docs/screenshots/prototype-fixed.png +0 -0
- package/index.js +2 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/marketplace/Oak-liuhj__dsh-session-rollover.yml +7 -0
- package/marketplace/SUBMISSION.md +26 -0
- package/package.json +99 -4
- package/screenshots.json +6 -0
- package/scripts/build-client.mjs +12 -0
- package/scripts/check-release.mjs +64 -0
- package/src/application/handoff-message.mjs +53 -0
- package/src/application/rollover.mjs +236 -0
- package/src/assembly.mjs +4 -0
- package/src/client/rollover-ui.js +284 -0
- package/src/client/toast-client.js +342 -0
- package/src/cluster.mjs +3 -0
- package/src/domain/cluster-index.mjs +65 -0
- package/src/domain/handoff.mjs +67 -0
- package/src/domain/inflight.mjs +25 -0
- package/src/domain/mode.mjs +34 -0
- package/src/domain/naming.mjs +78 -0
- package/src/domain/summary.mjs +68 -0
- package/src/domain/todos.mjs +23 -0
- package/src/domain/turns.mjs +43 -0
- package/src/handoff.mjs +2 -0
- package/src/inflight.mjs +2 -0
- package/src/mode.mjs +2 -0
- package/src/naming.mjs +2 -0
- package/src/notices.mjs +2 -0
- package/src/server/host-adapter.mjs +142 -0
- package/src/server/notice-route.mjs +98 -0
- package/src/server/plugin.mjs +423 -0
- package/src/storage/index-store.mjs +48 -0
- package/src/storage/notices.mjs +117 -0
- package/src/storage/rollover-state.mjs +75 -0
- package/src/summary.mjs +2 -0
- package/src/todos.mjs +2 -0
- package/src/turns.mjs +2 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# 更新记录
|
|
2
|
+
|
|
3
|
+
## 1.1.1 — 2026-11-07
|
|
4
|
+
|
|
5
|
+
- 公开包名改为 `dsh-session-rollover`,作者 Oak-liuhj;不改变运行数据路径、`sessionRollover` 服务和兼容导出。
|
|
6
|
+
- 补齐 DSH / 市场元数据、双语标题与简介、长说明、PNG 图标、截图索引和目录投稿文件。
|
|
7
|
+
- 会话标题栏 `⋯` 新增“使用说明”,兼容未实现长说明渲染的旧宿主。
|
|
8
|
+
- 修复窄窗口下会话菜单按钮与宿主右侧工具区重叠。
|
|
9
|
+
- 增加发布格式校验和安装包资源检查;浏览器入口随源码分发,安装时不运行构建。
|
|
10
|
+
- 提供 scoped 旧包迁移指引,保留双许可证和上游归属。
|
|
11
|
+
|
|
12
|
+
## 1.1.0 — 2026-11-07
|
|
13
|
+
|
|
14
|
+
- 修复真实用户轮数、安全切点、同刻交接快照、卷号、重试与索引恢复。
|
|
15
|
+
- 完善摘要卡、来源导航、归档输入保护、双向只读开关及浅深主题。
|
|
16
|
+
- 86 项回归通过,并以隔离宿主和本地模型夹具验证十轮分卷、待办续接与只读状态;详见 `docs/r3-validation.md`。
|
|
17
|
+
|
|
18
|
+
## 1.0.0
|
|
19
|
+
|
|
20
|
+
- 早期内部安装版本,使用 `@deepseek-ai/dsh-session-rollover` 包名。
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/LICENSE.upstream
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fei2411
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
dsh-session-rollover
|
|
2
|
+
Maintained by Oak-liuhj.
|
|
3
|
+
|
|
4
|
+
This distribution includes MIT-licensed source code.
|
|
5
|
+
The original copyright notice and license are preserved in LICENSE.upstream.
|
|
6
|
+
Project changes are provided under Apache License 2.0 (LICENSE).
|
|
7
|
+
Both notices and licenses must be retained when redistributing this package.
|
|
8
|
+
|
|
9
|
+
This is a community plugin, not an official DeepSeek product.
|
package/README.md
CHANGED
|
@@ -1,3 +1,156 @@
|
|
|
1
|
-
#
|
|
1
|
+
# dsh-session-rollover
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="./assets/icon.png" alt="会话分卷与续接" width="80" height="80">
|
|
4
|
+
|
|
5
|
+
**会话分卷与续接,让长任务跨会话继续。**
|
|
6
|
+
|
|
7
|
+
为 [DeepSeek Harness](https://github.com/deepseek-ai/dsh) 提供自动分卷、工作交接和历史回看。长会话达到设定轮数后,插件会在当前执行结束的安全时机创建下一卷,携带待办、当前步骤和约束继续工作,旧卷保留为只读归档。
|
|
8
|
+
|
|
9
|
+
适合持续编码、问题排查和多步骤任务。支持 Web 与桌面客户端,无需为插件单独配置 API Key。
|
|
10
|
+
|
|
11
|
+
**版本 1.1.1** · **已验证 DSH 0.2.1-rc.5** · **维护者 Oak-liuhj**
|
|
12
|
+
|
|
13
|
+
[使用指南](./docs/DETAIL.zh-CN.md) · [English guide](./docs/DETAIL.md) · [更新记录](./CHANGELOG.md) · [问题反馈](https://github.com/Oak-liuhj/dsh-session-rollover/issues)
|
|
14
|
+
|
|
15
|
+
## 功能一览
|
|
16
|
+
|
|
17
|
+
| 功能 | 使用体验 |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| 自动分卷 | 默认每 10 条真实用户消息触发,等待当前执行及工具调用结束后交接 |
|
|
20
|
+
| 工作快照 | 新卷首条接续卡保留待办、全部进行中步骤、约束、文件线索和后台任务状态 |
|
|
21
|
+
| 摘要与 JSON | 摘要支持展开,完整快照可查看、复制,便于核对交接内容 |
|
|
22
|
+
| 来源回溯 | 标题栏显示轮数和卷序,接续卡可跳转上一卷 |
|
|
23
|
+
| 归档只读 | 旧卷默认只读,可切换“允许再次写入 / 恢复只读”,设置持久保存 |
|
|
24
|
+
| 手动接续 | 通过会话标题栏 `⋯` 提前换会话,或携带快照另开独立系列 |
|
|
25
|
+
|
|
26
|
+
每个会话系列最多 9 卷。达到上限后,可通过“新建独立会话”继续,并保留快照出处。
|
|
27
|
+
|
|
28
|
+
## 界面预览
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
截图来自隔离宿主与本地模型夹具。右侧实时任务进度由可选的 [dsh-todo-progress](https://github.com/Oak-liuhj/dsh-todo-progress) 提供;本插件的接续卡保留切卷时的历史快照,后续任务进度不会改写它。未安装任务进度插件时,也可使用分卷与交接功能。
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary>查看归档只读与深色主题</summary>
|
|
36
|
+
|
|
37
|
+

|
|
38
|
+
|
|
39
|
+

|
|
40
|
+
|
|
41
|
+
</details>
|
|
42
|
+
|
|
43
|
+
## 安装
|
|
44
|
+
|
|
45
|
+
需要已配置模型、可正常对话的 DSH 宿主。浏览器入口随包预构建,安装插件时无需自行构建。
|
|
46
|
+
|
|
47
|
+
可在 DSH 插件市场搜索 `dsh-session-rollover` 安装并启用,也可通过插件包名、GitHub 源或本地安装包安装。
|
|
48
|
+
|
|
49
|
+
### 通过 npm 包名安装
|
|
50
|
+
|
|
51
|
+
在桌面客户端的「插件 → 添加插件 → 填入插件 npm 包名」中填写:
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
dsh-session-rollover
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
使用 CLI 时,以下命令以桌面 `desktop` profile 为例;Web 用户请替换为实际使用的 profile 名称:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
dsh plugin --profile desktop add dsh-session-rollover
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
此方式从 npm 下载发布包。国内镜像可能延迟同步;遇到 npm 404 时,先确认镜像已同步,或使用下方 GitHub 安装方式。
|
|
64
|
+
|
|
65
|
+
### 从 GitHub 安装
|
|
66
|
+
|
|
67
|
+
此方式获取 GitHub 仓库中已推送的代码:
|
|
68
|
+
|
|
69
|
+
```powershell
|
|
70
|
+
dsh plugin --profile desktop add github:Oak-liuhj/dsh-session-rollover
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 从本地安装包安装
|
|
74
|
+
|
|
75
|
+
将路径替换为实际 tgz 文件位置:
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
dsh plugin --profile desktop add "D:/release/dsh-session-rollover-1.1.1.tgz"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
桌面用户安装后,请通过桌面客户端重启宿主。已安装旧包 `@deepseek-ai/dsh-session-rollover` 时,应先替换旧依赖,避免同时加载新旧两份插件;升级前备份配置与插件数据。详细步骤见 [升级指南](./docs/PUBLISHING.md#从-scoped-旧包迁移)。
|
|
82
|
+
|
|
83
|
+
## 快速上手
|
|
84
|
+
|
|
85
|
+
1. **打开主会话**:标题栏会显示本卷轮数和阈值,默认阈值为 10 条真实用户消息。
|
|
86
|
+
2. **继续正常对话**:达到阈值后,等待当前执行结束。工具调用、压缩或换段尚未完成时,插件会暂缓分卷。
|
|
87
|
+
3. **查看新卷接续卡**:展开摘要、查看或复制 JSON,通过来源链接回看上一卷。
|
|
88
|
+
4. **按需手动操作**:点击标题栏 `⋯`,选择“现在换会话”“新建独立会话”或“使用说明”。
|
|
89
|
+
|
|
90
|
+
旧卷输入区域上方提供“允许再次写入 / 恢复只读”开关。恢复写入后可继续对话,但该旧卷不会再次自动分卷。
|
|
91
|
+
|
|
92
|
+
## 配置
|
|
93
|
+
|
|
94
|
+
正常安装已包含 [挂载补丁](./cordis.patch.yml)。在宿主中修改现有 `session-rollover` 插件节点的 `config`,无需重复添加节点。常用配置如下:
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
mode: auto
|
|
98
|
+
threshold: 10
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
| 配置项 | 默认值 | 说明 |
|
|
102
|
+
| --- | --- | --- |
|
|
103
|
+
| `mode` | `auto` | `auto` 自动分卷;`manual` 达阈值只提示;`off` 关闭自动判定 |
|
|
104
|
+
| `threshold` | `10` | 每卷的真实用户消息阈值 |
|
|
105
|
+
| `forceAuto` | `false` | 保持自动模式,不因外部换段标记降为手动;仍执行安全检查 |
|
|
106
|
+
| `dataDir` | 自动 | 自定义本地持久化目录,例如 `D:/dsh-data/session-rollover` |
|
|
107
|
+
|
|
108
|
+
手动操作不受轮数阈值和 mode 限制,但仍需等待安全切点;只读、已封卷或子会话等状态也会限制操作。
|
|
109
|
+
|
|
110
|
+
## 常见问题
|
|
111
|
+
|
|
112
|
+
**“10 轮”按什么计算?**
|
|
113
|
+
|
|
114
|
+
每条真实用户消息计为一轮,与 token 数量或模型内部执行次数无关。系统上下文、技能目录和交接消息不计入;子会话不自动分卷。
|
|
115
|
+
|
|
116
|
+
**分卷会额外调用模型吗?**
|
|
117
|
+
|
|
118
|
+
摘要使用确定性摘录,不额外调用语言模型。新卷继续对话使用 DSH 已配置的模型;插件无需额外 API Key,正常对话仍遵循模型服务商的计费方式。
|
|
119
|
+
|
|
120
|
+
**为什么达到阈值后没有立即分卷?**
|
|
121
|
+
|
|
122
|
+
插件需要等待当前执行及工具调用结束,并避开压缩和换段。检测到外部 `[Checkpoint N]` 或 `[Handoff · part N]` 标记时,自动模式会降为手动;可检查配置与提示。宿主内部生成的交接上下文不会因此触发降级。
|
|
123
|
+
|
|
124
|
+
**后台任务也会自动恢复吗?**
|
|
125
|
+
|
|
126
|
+
快照记录后台任务的句柄和状态,不迁移、恢复或重新启动进程。文件路径仅作为交接线索,不代表文件一定已修改。
|
|
127
|
+
|
|
128
|
+
**交接内容过长或保存失败时会怎样?**
|
|
129
|
+
|
|
130
|
+
正文摘要上限为 1500 字符,完整交接消息上限为 16 KiB;超预算会拒绝交接并提示。自动交接初次失败后最多再试两次,由后续用户消息触发。出现存储降级提示时,应检查数据目录权限;文件存储不提供跨系统事务保证。
|
|
131
|
+
|
|
132
|
+
## 数据与卸载
|
|
133
|
+
|
|
134
|
+
数据保存在本机。默认目录为 `<DSH_HOME>/plugin-data/dsh-session-rollover`;未设置 `DSH_HOME` 时,使用 `~/.dsh/plugin-data/dsh-session-rollover`。可通过 `dataDir` 指定其他目录,更多路径优先级及文件说明见 [开发文档](./docs/DEVELOPMENT.md#数据目录)。
|
|
135
|
+
|
|
136
|
+
卸载命令:
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
dsh plugin --profile desktop remove dsh-session-rollover
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
卸载保留插件数据,重新安装可继续读取。交接 JSON 可能包含会话约束和本地文件路径,分享前请检查内容。
|
|
143
|
+
|
|
144
|
+
## 兼容性与开发
|
|
145
|
+
|
|
146
|
+
已验证 DSH `0.2.1-rc.5`,验证记录覆盖自动分卷、待办续接、来源导航、双向只读开关及浅深主题。旧宿主可能不显示插件长说明,可从会话 `⋯ → 使用说明` 查看内置指南。
|
|
147
|
+
|
|
148
|
+
现有验证使用隔离宿主与本地模型夹具,完整 Bot 群端、生产模型和后续宿主版本仍需单独复验。详见 [功能验证](./docs/r3-validation.md) 与 [市场展示验证](./docs/marketplace-validation.md)。
|
|
149
|
+
|
|
150
|
+
[开发与集成](./docs/DEVELOPMENT.md) · [架构说明](./docs/architecture.md) · [发布与上架指南](./docs/PUBLISHING.md)
|
|
151
|
+
|
|
152
|
+
反馈问题时,请提供插件版本、DSH 版本、复现步骤和相关报错。维护者:Oak-liuhj。社区插件,与 DeepSeek 官方无隶属关系。
|
|
153
|
+
|
|
154
|
+
## 许可证
|
|
155
|
+
|
|
156
|
+
[Apache-2.0](./LICENSE) 与 [MIT](./LICENSE.upstream)。分发时须保留两份许可证及 [NOTICE](./NOTICE)。SPDX:`(Apache-2.0 AND MIT)`。
|
package/assets/icon.png
ADDED
|
Binary file
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="180" height="180" viewBox="0 0 180 180">
|
|
2
|
+
<rect width="180" height="180" rx="38" fill="#263eaa"/>
|
|
3
|
+
<rect x="32" y="30" width="72" height="96" rx="12" fill="#96b5ff"/>
|
|
4
|
+
<rect x="68" y="54" width="78" height="100" rx="12" fill="#fff"/>
|
|
5
|
+
<path d="M84 76h43M84 91h34M84 106h26" stroke="#5269bf" stroke-width="6" stroke-linecap="round"/>
|
|
6
|
+
<path d="M40 139h33m-12-12 12 12-12 12" fill="none" stroke="#b7f3de" stroke-width="7" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
</svg>
|