dsh-context-manager 0.0.0-stage → 1.6.0

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/locale/en.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "Context manager",
4
+ "description": "Session context management plugin: adds a Context manager entry (the list icon on the right of the session header) to the session header and manages the model context of a DSH session — delete messages one by one or whole turns, and restore them later. Two typical uses: roll back to the start of a turn and ask again (use /ctxmgr turns to read the turn numbers, then /ctxmgr deleteturn 5 to move that whole turn out of the context), and drop noise such as error logs, pasted code and trial-and-error instructions entry by entry (use /ctxmgr list to find the indexes, then /ctxmgr delete 12,13,14). The context_manager tool offers the same operations (actions list / list-turns / delete / delete-turns / restore). Deleting appends an empty developer message (a tombstone) that replaces the range on the session surface, so the raw session log, the chat transcript and audit data stay intact and removed messages disappear only from later model requests. Turns are listed with numbers, previews and an in-progress marker. Operations that cannot append safely are written into the session log as plugin records and applied at the next request, so they survive restarts; restore puts user and context messages back at their original position and appends assistant content at the tail. Local only, nothing leaves the machine. Requires a running session; system prompts and messages that are still streaming cannot be deleted. Turning the plugin off removes the header entry, the command and the tool, while tombstones already written stay in the log.",
5
+ "detail": "docs/DETAIL.md"
6
+ }
7
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "meta": {
3
+ "title": "会话上下文管理",
4
+ "description": "会话上下文管理插件:在会话标题栏增加「上下文管理」入口(标题栏右侧的列表图标),管理会话的模型上下文——按条删、按整轮删,之后还能恢复。典型用法有两个:回退到某一轮的开始重新提问(用 /ctxmgr turns 看清轮号,再用 /ctxmgr deleteturn 5 把该轮整体移出上下文),以及把报错日志、粘贴的代码与试错指令按条清出上下文(/ctxmgr list 找序号,再用 /ctxmgr delete 12,13,14 清掉)。也可以用 context_manager 工具(action 为 list / list-turns / delete / delete-turns / restore)。删除的做法是追加一条空的 developer 消息,在会话表面上替换掉目标区间(tombstone),因此原始会话日志、聊天记录与审计数据始终保留,被删的消息只是从后续模型请求中消失。对话轮列表带轮号、预览与「进行中」标记。无法安全追加的操作会作为 plugin 记录写进会话日志,在下一个请求时应用,重启不丢失;恢复时用户与上下文消息回到原位置,助手内容追加到末尾。纯本地运行,不外发任何数据。需要会话处于运行状态;系统提示词与仍在流式生成的消息不在可删除范围内。关闭插件后标题栏入口、命令与工具都会消失,已写入日志的删除记录仍然保留。",
5
+ "detail": "docs/DETAIL.zh.md"
6
+ }
7
+ }
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
- {
2
- "name": "dsh-context-manager",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "dsh-context-manager",
3
+ "version": "1.6.0",
4
+ "type": "module",
5
+ "description": "Manage a DSH session's model context: delete single messages or whole conversation turns (roll back to the start of any turn, drop noise), and restore them later, without touching the raw session log.",
6
+ "license": "MIT",
7
+ "author": "xian-yu-zhao",
8
+ "keywords": [
9
+ "dsh",
10
+ "dsh-plugin",
11
+ "deepseek-harness",
12
+ "cordis",
13
+ "plugin",
14
+ "session",
15
+ "context",
16
+ "conversation",
17
+ "turn",
18
+ "rollback",
19
+ "prune",
20
+ "tombstone",
21
+ "delete",
22
+ "restore"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/xian-yu-zhao/dsh-context-manager.git"
27
+ },
28
+ "homepage": "https://github.com/xian-yu-zhao/dsh-context-manager#readme",
29
+ "bugs": {
30
+ "url": "https://github.com/xian-yu-zhao/dsh-context-manager/issues"
31
+ },
32
+ "publishConfig": {
33
+ "access": "public",
34
+ "registry": "https://registry.npmjs.org/"
35
+ },
36
+ "exports": {
37
+ ".": "./index.js",
38
+ "./client": "./client.js",
39
+ "./locale/*.json": "./locale/*.json",
40
+ "./icon": "./icon.svg"
41
+ },
42
+ "files": [
43
+ "index.js",
44
+ "client.js",
45
+ "core.js",
46
+ "cordis.patch.yml",
47
+ "locale/*.json",
48
+ "icon.svg",
49
+ "docs",
50
+ "README.md",
51
+ "CHANGELOG.md",
52
+ "LICENSE"
53
+ ],
54
+ "dsh": {
55
+ "bundle": {
56
+ "patch": "./cordis.patch.yml"
57
+ },
58
+ "client": {
59
+ "platform": "web",
60
+ "immediately": true,
61
+ "inject": [
62
+ "@deepseek-ai/dsh-api-remotes",
63
+ "@deepseek-ai/dsh-api-session-controller",
64
+ "@deepseek-ai/dsh-client-locale",
65
+ "@deepseek-ai/dsh-client-ui-conversation",
66
+ "@deepseek-ai/dsh-client-ui-session"
67
+ ]
68
+ }
69
+ }
70
+ }