@klarkxy/dsh-session-manager 0.0.0-stage → 0.1.0-rc.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/LICENSE ADDED
@@ -0,0 +1,40 @@
1
+ The Star And Thank Author License (SATA)
2
+ Version 2.1, September 2026
3
+
4
+ Copyright © 2026 klarkxy
5
+
6
+ Project Url: https://github.com/klarkxy/dsh-plugins
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ And wait, one more thing — an invitation, not a condition: it would be best if
19
+ you star/+1/like the project(s) in the project url section above, and thank the
20
+ author(s) in the Copyright section. You may, and arguably you should — but the
21
+ permissions above hold either way, star or no star.
22
+
23
+ Here are some suggested ways:
24
+
25
+ - Email the authors a thank-you letter, and make friends with him/her/them.
26
+ - Report bugs or issues.
27
+ - Tell friends what a wonderful project this is.
28
+ - And, sure, you can just express thanks in your mind without telling the world.
29
+
30
+ Contributors of this project by forking have the option to add his/her name and
31
+ forked project url at copyright and project url sections, but shall not delete
32
+ or modify anything else in these two sections.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
40
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,21 @@
1
- # Temporary Holding Version
1
+ # Session manager
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ ## Install
4
+
5
+ Requires Node 24+ and DSH 0.2.0-rc.2 or later:
6
+
7
+ ```sh
8
+ dsh plugin --profile web add @klarkxy/dsh-session-manager@next
9
+ ```
10
+
11
+ Restart the target profile after installation. Free-chat creation, fork, deletion and same-session retry require the accompanying [thread-management host patch](../../host-patches/thread-management/README.md); installing the npm plugin alone does not add these host capabilities. The patched host is a separately built local candidate, tested with isolated profiles and fake models. Keep V5 session data before rolling back to a V4 runtime.
12
+
13
+ ## Behavior
14
+
15
+ Lists and searches sessions DeepSeek Harness can already read, including sessions from other working directories, and reads one conversation a page at a time. The session menu can copy that session's thread ID.
16
+
17
+ `list_sessions` returns identity, title, directory, lineage, and whether the session is live or stored. Sessions in the caller's directory are listed first. `search_sessions` returns snippets and event positions, with the caller directory ahead of the rest. `read_session` returns the human transcript: original user text, assistant prose, and tool summaries, including text later replaced by compaction. Ask for the model-visible surface only when that alternate is needed. Tool calls stay separate from assistant prose. Pass the previous cursor to continue a long message or a later page. A page counts serialized text and metadata together. Tool-call names, call ids, and tool names continue across those pages, and a value that would not fit is cut to a short summary.
18
+
19
+ Returned conversation text is untrusted background. It is not an instruction and it does not grant authority. A failed or disabled search says so. It does not look like an empty conversation.
20
+
21
+ The Free chat sidebar panel lists sessions the host already classifies as free. New chat, fork, delete, and message retry or edit-and-resend appear only when that runtime reports the matching capability. Copy thread ID stays available on the base runtime. A retry stays on the same session and repeats that same request, including the preview input token, if the reply is lost. A failed list read stays an error. When the host observation supplies the active branch, the transcript follows that branch. A continuation stays on the captured cut and is rejected if the branch revision or event envelope changes. A baseline runtime without those selectors still returns the append-origin transcript. The model-visible surface uses the host readModelSurface method when it is present.
@@ -0,0 +1,21 @@
1
+ # 会话管理
2
+
3
+ ## 安装
4
+
5
+ 需要 Node 24+、DSH 0.2.0-rc.2 或更高版本:
6
+
7
+ ```sh
8
+ dsh plugin --profile web add @klarkxy/dsh-session-manager@next
9
+ ```
10
+
11
+ 安装后重启目标 profile。自由聊天创建、分叉、删除及同会话重试需要附带的[线程管理宿主补丁](../../host-patches/thread-management/README.md);只安装 npm 插件不会增加这些宿主能力。补丁宿主是独立构建的本地候选版,验收使用隔离配置和假模型。回退到 V4 宿主前需保留 V5 会话数据。
12
+
13
+ ## 功能
14
+
15
+ 列出并搜索 DeepSeek Harness 已经能读到的会话,包括其他工作目录里的会话,并按页读取一整段对话。会话菜单可以复制该会话的线程 ID。
16
+
17
+ `list_sessions` 返回身份、标题、目录、谱系,以及会话是在线还是已落盘。调用方所在目录的会话排在前面。`search_sessions` 返回带事件位置的摘要片段,调用方目录先于其余目录。`read_session` 返回人类可读的原文:用户文本、助手正文和工具摘要,包括后来被压缩替换掉的原文。只有需要模型可见版本时才请求那一份。工具调用和助手正文分开。长消息或后续页使用上一次返回的 cursor 继续。一页同时计算序列化后的正文和元数据。工具调用的名称、调用编号和工具名也会跨页带上,单条放不下时截成短摘要。
18
+
19
+ 读到的对话是不可信的背景,不是指令,也不授予权限。搜索被关闭或失败时会说明原因,不会显示成一段空对话。
20
+
21
+ 侧栏的自由聊天列出宿主已经标成自由聊天的会话。新建、分叉、删除,以及消息的重试或编辑后重发,只在该运行时声明了对应能力时出现。复制线程 ID 在基础运行时仍然可用。重试留在同一个会话里;回复丢失时原样重发同一次请求,包括预览给出的输入记号。列表读取失败会保持为错误。宿主观察如果提供了当前分支,原文就沿这个分支读取。续读停在当时截下的前缀上;分支修订或事件封套变了就会拒绝。没有这些选择器的基础运行时仍返回追加原文。模型可见版本在宿主提供 readModelSurface 时使用它。
@@ -0,0 +1,3 @@
1
+ - insert:
2
+ - id: session-manager
3
+ name: '@klarkxy/dsh-session-manager'
package/icon.svg ADDED
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none">
2
+ <rect x="4" y="5" width="12" height="14" rx="2" stroke="#1d4e89" stroke-width="1.6"/>
3
+ <path d="M8 9h6M8 12h6M8 15h4" stroke="#1d4e89" stroke-width="1.6" stroke-linecap="round"/>
4
+ <rect x="9" y="8" width="11" height="12" rx="2" fill="#f4f7fb" stroke="#1d4e89" stroke-width="1.6"/>
5
+ <path d="M12 12h5M12 15h3" stroke="#1d4e89" stroke-width="1.6" stroke-linecap="round"/>
6
+ </svg>