dsh-session-guard 0.3.1 → 3.0.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/README.md CHANGED
@@ -32,19 +32,43 @@
32
32
  >
33
33
  > | DSH 版本 | 加载 | 设置注册 | 会话事件 / 会话门 | 客户端半 |
34
34
  > | --- | --- | --- | --- | --- |
35
- > | 0.1.0-rc.7 ~ 0.1.1-rc.x | | `ctx.settings.register(ns, schema, { base })` | ✅ 形状一致 | ✅ 无平台值导入 |
36
- > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | | `register` 仍保留(另加 `installSection`) | ✅ 形状一致 | ✅ 无平台值导入 |
37
- > | 0.1.3+ / 0.1.5-alpha.1 | 接口仍在(未验证) | `register` 仍在(行号未变) | ✅ | ✅ |
35
+ > | 0.1.0-rc.7 ~ 0.1.1-rc.x | 不在本线(`legacy/0.1.2` 之前的历史版本) | `ctx.settings.register(ns, schema, { base })` | ✅ 形状一致 | ✅ 无平台值导入 |
36
+ > | 0.1.2-alpha.2+ / 0.1.2-rc.1 | 不在本线 → 用 `legacy/0.1.2`(npm `@dsh-0.1.2`) | `register` 仍保留(另加 `installSection`) | ✅ 形状一致 | ✅ 无平台值导入 |
37
+ > | **0.1.5-rc.2** | ✅(**本线**,dist-tag `dsh-0.1.5`) | `register` 仍在(字符串命名空间) | ✅ 事件经 `snapshotEvents()` 双路径读取 | ✅ |
38
38
  >
39
- > 一份产物同时支持两版本。`session/event`、`agent.cancel`、`goals.pause`、
39
+ > **本线身份**:分支 `compat/0.1.5`,npm 版本号 **`3.0.0`**(semver),dist-tag **`dsh-0.1.5`**。
40
+ > `package.json` 与 `dsh.plugin.json` 的 `engines.dsh` 与三个 `@deepseek-ai/dsh-client-*`
41
+ > peer 下界统一为 `>=0.1.5-rc.2 <0.2.0-0`。
42
+ > 历史上 README 曾用「2.x / 3.x」当**线代号**,那是叙述习惯,**不是注册表里可拉取的版本号** ——
43
+ > 请一律以 npm 版本号 `0.3.1`(0.1.2 线)与 `3.0.0`(0.1.5 线)为准。
44
+ >
45
+ > **其它线的落点**:DSH `0.1.2-rc.x` 宿主请使用分支 **`legacy/0.1.2`**(npm dist-tag
46
+ > `dsh-0.1.2`,版本 `0.3.1`)。**`main` 已冻结在 `0.2.0-beta.1`,不是 0.1.2 线的发布分支。**
47
+ > DSH `0.1.0-rc.7` ~ `0.1.1-rc.x` 宿主请使用 ≤ `0.1.2` 的历史版本。
48
+ > 字段源头定义见
49
+ > `mine-dsh-plugins/improve-dsh-plugins/DSH-PLUGIN-VERSION-DISTRIBUTION-STRATEGY.md` §2.2。
50
+ >
51
+ > **0.1.5 适配(compat/0.1.5 分支,npm 3.0.0)**:
52
+ > ① `agent.followup` 双路径——0.1.5 将 Inbox 改为 agent-loop 只读投影,若 `followup`
53
+ > 不再存在则回退 `agent.send`,两者皆无时 warn 降级不抛错(恢复续跑的兜底);
54
+ > ② 恢复消息 `source` 补 `form: 'instructions'`(0.1.5 ContextFormed 契约,旧版本忽略);
55
+ > ③ `webServer.register` 包 try/catch,注册失败仅记日志不炸宿主加载;
56
+ > ④ 0.1.5 移除 `session.events` 数组访问器,事件读取改为 `snapshotEvents()` 主路径 +
57
+ > 旧数组回退(仅影响 `findToolOutcome` / `lastUserPrompt` 两条辅助路径,事件类型匹配不变)。
58
+ > 已核实 0.1.5 的 `WebRoute`(exact/prefix + SSE)契约不变,客户端
59
+ > `fetch('/session-guard/...')` 无需改 `/api` 前缀。
60
+ > 下面这张兼容表跨 0.1.1 / 0.1.2 两代 API,本线只认领 0.1.5 那一行。
61
+ > `session/event`、`agent.cancel`、`goals.pause`、
40
62
  > `agent.followup`、`commands.register`、`timer.interval`、`webServer.register`、
41
63
  > `agent/request`、`llm.listConfigurableProviders`、`settings.register/get` 在
42
- > `dsh-v0.1.1-rc.2` 与 `dsh-v0.1.2-rc.1` 之间签名一致(并已核到 `0.1.5-alpha.1`);
64
+ > `dsh-v0.1.1-rc.2` 与 `dsh-v0.1.2-rc.1` 之间签名一致(本线已核到 `dsh-v0.1.5-rc.2`);
43
65
  > 唯一需要双读的是 `tool/result` 记录的调用 id 形态(`content[].toolCallId` 优先、
44
66
  > `source.callId` 回退),已抽到 `src/tool-call-id.js` 并配单测——两版本的回放日志都可能出现这两种形态。
67
+ > 0.1.5 起 `session.events` 数组访问器被移除,本线经 `snapshotEvents()`(保留旧数组回退)读取,
68
+ > 只影响 `findToolOutcome` / `lastUserPrompt` 两条辅助路径。
45
69
  > `model/selection` 事件**仅 0.1.2+**,只做切模型加速且必须特性探测;设置面只用
46
70
  > `register` + `get` 交集(不碰 `installSection` / 已移除的 `installSettingsSection`)。
47
- > 漂移守卫脚本:`tools/check-api-drift.ps1`(对四个 tag 断言必需接口存在)。
71
+ > 漂移守卫脚本:`tools/check-api-drift.ps1`(本线默认对 `dsh-v0.1.5-rc.2` 断言必需接口存在)。
48
72
 
49
73
  > 高峰时段自动暂停运行中的会话、低峰/周末自动续跑;配合 input-traffic 的冻结按钮做到**会话级**锁定;后端**自动重试**在冻结/门控期间让路。核心基于**自研会话门**(`agent.cancel keepInbox + goals.pause + session/event 安全边界 + followup 续跑`),不再依赖 dsh-task-control。
50
74
 
@@ -74,9 +98,23 @@
74
98
  ## 安装
75
99
 
76
100
  ```bash
77
- dsh plugin --profile web add github:<owner>/dsh-session-guard
101
+ # DSH 0.1.5-rc.x 宿主(本线,dist-tag dsh-0.1.5)
102
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.5
103
+
104
+ # 或直接走 git 分支
105
+ dsh plugin --profile web add github:drscrewdriver/dsh-session-guard#compat/0.1.5
106
+
107
+ # DSH 0.1.2-rc.x 宿主请改用 0.1.2 线
108
+ dsh plugin --profile web add dsh-session-guard@dsh-0.1.2
78
109
  ```
79
110
 
111
+ `compat/0.1.5` 是 DSH `0.1.5-rc.x` 专线,npm 版本号 **`3.0.0`**;DSH `0.1.2-rc.x` 宿主请改用
112
+ 分支 **`legacy/0.1.2`**(npm dist-tag `dsh-0.1.2`,版本 `0.3.1`)。**`main` 已冻结在 `0.2.0-beta.1`,
113
+ 不是 0.1.2 线的发布分支。**
114
+
115
+ > ⚠️ 不要依赖裸包名 `dsh-session-guard`:npm 的 `latest` 标签无法同时服务两条互斥版本线
116
+ > (两条线的 `engines.dsh` 按 semver 预发布规则互斥),必须显式指定 dist-tag。
117
+
80
118
  装后重启 dsh web 并刷新页面。
81
119
 
82
120
  ## 设置(设置 → 插件 → session-guard,简单开关)
package/cordis.patch.yml CHANGED
@@ -1,10 +1,10 @@
1
- # dsh-session-guard bundle patch:一行装配进 profile。
2
- #
3
- # host 半(src/index.js)注册 sessionGuard 服务(冗余端口,供 input-traffic 适配)、
4
- # 高峰自动会话门(taskControl.pause/resume,缺失时回退锁等待队列)、
5
- # /session-guard/* 路由与 设置→插件→session-guard 子板块(简单开关)。
6
- # 浏览器半(src/client/index.js,经 package.json dsh.client 声明)提供
7
- # 高峰状态徽标 + 无 input-traffic 时的回退冻结按钮。
8
- - insert:
9
- - id: session-guard
10
- name: dsh-session-guard
1
+ # dsh-session-guard bundle patch:一行装配进 profile。
2
+ #
3
+ # host 半(src/index.js)注册 sessionGuard 服务(冗余端口,供 input-traffic 适配)、
4
+ # 高峰自动会话门(taskControl.pause/resume,缺失时回退锁等待队列)、
5
+ # /session-guard/* 路由与 设置→插件→session-guard 子板块(简单开关)。
6
+ # 浏览器半(src/client/index.js,经 package.json dsh.client 声明)提供
7
+ # 高峰状态徽标 + 无 input-traffic 时的回退冻结按钮。
8
+ - insert:
9
+ - id: session-guard
10
+ name: dsh-session-guard
package/dsh.plugin.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "id": "dsh-external/dsh-session-guard",
3
- "version": "0.2.0-beta.1",
3
+ "version": "3.0.0",
4
4
  "main": "./src/index.js",
5
5
  "description": "高峰自动会话门:step 级门控 + 周末模式 + 高峰自动暂停 + 官方源二维判定 + 会话级冻结 + 后端自动重试。",
6
+ "engines": {
7
+ "dsh": ">=0.1.5-rc.2 <0.2.0-0"
8
+ },
6
9
  "contributes": {
7
10
  "tools": [],
8
11
  "skills": []