dsh-input-traffic 0.2.10-beta.1 → 0.2.10-beta.2
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 +10 -0
- package/README.en.md +12 -1
- package/README.md +12 -1
- package/dsh.plugin.json +1 -1
- package/lib/client.js +1433 -1433
- package/lib/client.js.map +1 -1
- package/lib/types/client/freeze-button.d.ts +16 -16
- package/lib/types/client/freeze-button.js +86 -86
- package/lib/types/client/index.d.ts +47 -47
- package/lib/types/client/index.js +117 -117
- package/lib/types/client/locales.d.ts +63 -63
- package/lib/types/client/locales.js +211 -211
- package/lib/types/client/locales.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
### 变更:冻结按钮文案与 session-guard 的分工说明
|
|
8
|
+
|
|
9
|
+
- **按钮文案**:`steer.freeze` →「冻结追加」(Freeze & append / 凍結して追加 / 동결 후 추가),
|
|
10
|
+
`steer.resume` →「恢复追加」(Resume & append / 再開して追加 / 재개 후 추가)——与 session-guard 新增的
|
|
11
|
+
「暂停会话 / 继续会话」按钮并列,避免两个「恢复」混淆。只改文案,行为不变。
|
|
12
|
+
- **职责边界**(README 新增小节):本插件只负责「排」——决定用户输入进 `next-step` 还是 `next-turn`、
|
|
13
|
+
什么档位、何时被消费(`updateQueue(steer|remove|edit)` / `send` / `cancel`);session-guard 只负责「停」——
|
|
14
|
+
`agent/pre-step` step 门、回合级暂停、请求级 hold。`next-step` 的物理含义是「与工具返回同级的下一步
|
|
15
|
+
(同一 turn 内)」,`next-turn` 才是新回合。
|
|
16
|
+
|
|
7
17
|
### 新增:DSH 双版本兼容(0.1.1-rc.2 / 0.1.2-rc.1)
|
|
8
18
|
|
|
9
19
|
- **单一产物,运行时自适应**:同一份 `lib/client.js` 在两个版本都能加载,无版本号字符串分支。
|
package/README.en.md
CHANGED
|
@@ -108,7 +108,18 @@ The freeze button hands off to a **sessionGuard bridge** (`src/client/session-gu
|
|
|
108
108
|
- `src/client/freeze-store.ts` — session-scoped freeze state (`Map<sessionId, {frozen, pending}>`, shared by button ↔ dock);
|
|
109
109
|
- `src/client/session-guard-bridge.ts` — session-guard RPC bridge (fail-open, silently skipped when session-guard is absent);
|
|
110
110
|
- `src/client/index.ts` — slot registration + composer-block injection (`conversation.blocks.set`).
|
|
111
|
-
- **Scope comparison**: this plugin's freeze button = **per-session** (locks that one session by id); session-guard's **auto
|
|
111
|
+
- **Scope comparison**: this plugin's freeze button = **per-session** (locks that one session by id); session-guard's **peak auto gate / step gate = global or per-session pause** (holds on peak entry, releases off-peak). They complement each other — this plugin owns the queue and freezing, session-guard owns when progress may happen.
|
|
112
|
+
|
|
113
|
+
**Division of labour (important): this plugin only "orders", session-guard only "stops"**
|
|
114
|
+
|
|
115
|
+
| | This plugin (input-traffic) | session-guard |
|
|
116
|
+
|---|---|---|
|
|
117
|
+
| Job | **which queue** user input goes to, at what tier, and when it is consumed | **when progress may happen** (step / turn / request) |
|
|
118
|
+
| DSH primitives | the `next-step` / `next-turn` pending queues + `updateQueue(steer\|remove\|edit)` / `send` / `cancel` | `agent/pre-step` (step gate), `agent.cancel({keepInbox:true})` + `goals.pause`, `agent/request` hold |
|
|
119
|
+
| Freeze | detach `queued` + `steering` rows (**tiers preserved**) + composer block | `stopNextTurn`: **release the step gate first**, then turn-level pause (otherwise both wait on each other) |
|
|
120
|
+
| Resume | re-submit by tier (red cancel+send / yellow steer / green send) | `resume`: continue from the pause point |
|
|
121
|
+
|
|
122
|
+
The two queues mean: `next-step` = "the next step, **same level as a tool result**, still inside the same turn"; `next-turn` = "a new turn". That is why the yellow tier inserts into the current turn and the green tier waits for the turn to close.
|
|
112
123
|
|
|
113
124
|
## Queue management
|
|
114
125
|
|
package/README.md
CHANGED
|
@@ -123,7 +123,18 @@
|
|
|
123
123
|
- `src/client/freeze-store.ts` — 会话级冻结状态 store(`Map<sessionId, {frozen, pending}>`,供按钮 ↔ dock 共享);
|
|
124
124
|
- `src/client/session-guard-bridge.ts` — session-guard RPC 透传(fail-open,未装则静默);
|
|
125
125
|
- `src/client/index.ts` — slot 注册 + composer block 注入(`conversation.blocks.set`)。
|
|
126
|
-
- **作用域对比**:本插件冻结按钮 = **会话级**(按 sessionId 锁那一个会话);session-guard
|
|
126
|
+
- **作用域对比**:本插件冻结按钮 = **会话级**(按 sessionId 锁那一个会话);session-guard 的高峰自动门 / step 门 = **全局或会话级暂停**(入峰拉门、退峰自动放行)。
|
|
127
|
+
|
|
128
|
+
**分工(重要):本插件只负责「排」,session-guard 只负责「停」**
|
|
129
|
+
|
|
130
|
+
| | 本插件(input-traffic) | session-guard |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| 职责 | 用户输入进**哪条队列、什么档位、何时被消费** | **何时允许推进**(step / 回合 / 请求) |
|
|
133
|
+
| DSH 原语 | `next-step` / `next-turn` 两条待处理队列 + `updateQueue(steer\|remove\|edit)` / `send` / `cancel` | `agent/pre-step`(step 门)、`agent.cancel({keepInbox:true})` + `goals.pause`、`agent/request` hold |
|
|
134
|
+
| 冻结 | 摘 `queued` + `steering` 行(**保留档位**)+ composer block | `stopNextTurn`:**先释放 step 门**再做回合级暂停(否则两边互等) |
|
|
135
|
+
| 恢复 | 按档位重投(红 cancel+send / 黄 steer / 绿 send) | `resume`:从暂停点续跑 |
|
|
136
|
+
|
|
137
|
+
两条队列的物理含义:`next-step` = 「与**工具返回同级**的下一个 step,仍在同一个 turn 内」;`next-turn` = 「新的回合」。所以黄档是「插到当前回合的下一步」,绿档是「等回合结束后再开一轮」——这正是三档能被 API 在同一次 turn 中途看到的原因。
|
|
127
138
|
|
|
128
139
|
## 队列管理
|
|
129
140
|
|
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-input-traffic",
|
|
3
|
-
"version": "0.2.10-beta.
|
|
3
|
+
"version": "0.2.10-beta.2",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"description": "Busy-time input queue: three-tier planning, drag-to-reorder, interject/interrupt, batch clear, session freeze.",
|
|
6
6
|
"contributes": {
|