dsh-ntr 0.2.1 → 0.3.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/README.en.md +4 -4
- package/README.md +4 -4
- package/cordis.patch.yml +12 -0
- package/lib/bridge.js +646 -68
- package/lib/client/panel.js +162 -4
- package/lib/client/store.js +188 -4
- package/lib/client.js +431 -9
- package/lib/client.js.map +1 -1
- package/lib/impl.js +47 -0
- package/lib/index.js +15 -1
- package/lib/types/bridge.d.ts +206 -4
- package/lib/types/client/store.d.ts +87 -1
- package/lib/types/impl.d.ts +26 -1
- package/lib/types/protocol.d.ts +80 -0
- package/lib/types/update.d.ts +186 -0
- package/lib/update.js +696 -0
- package/package.json +1 -1
- package/src/bridge.ts +691 -68
- package/src/client/panel.tsx +288 -5
- package/src/client/store.ts +234 -8
- package/src/impl.ts +66 -1
- package/src/index.ts +16 -1
- package/src/protocol.ts +84 -0
- package/src/update.ts +712 -0
package/README.en.md
CHANGED
|
@@ -176,7 +176,7 @@ Every conversation has this tab. If the conversation has never been bound to an
|
|
|
176
176
|
|
|
177
177
|
**Agent stuck?**
|
|
178
178
|
|
|
179
|
-
Click Stop without worry. The plugin cancels the turn, and force-finalizes it if the agent ignores the cancel — a conversation never hangs forever.
|
|
179
|
+
Click Stop without worry. The plugin cancels the turn, and force-finalizes it if the agent ignores the cancel — a conversation never hangs forever. A turn the agent goes silent in is finalized too (see constraint 23 in AGENTS.md): with `session/load` the next send restarts the agent and resumes the session; without it the session is reset and its context is lost. If that was the conversation's first turn and it produced nothing, the agent lock rolls back and the next send starts a new session. A crashed agent process behaves the same way — one that supports resume comes back with its history on the next message.
|
|
180
180
|
|
|
181
181
|
**Agent replied with an empty bubble?**
|
|
182
182
|
|
|
@@ -216,8 +216,8 @@ That's stale dependency state, not a missing plugin file: the failing path will
|
|
|
216
216
|
- **Inlined tool activity**: tool calls are inserted into the main chat in the order they happened, with thinking and replies on either side — no layering.
|
|
217
217
|
- **Real permissions**: the agent's permission modes are listed verbatim, and every permission request is presented as-is. What you answer is what it receives.
|
|
218
218
|
- **Slash commands belong to the agent**: in NTR conversations, `/` pops the agent's own declared commands; DSH's same-named commands don't hijack your input.
|
|
219
|
-
- **Reconnect**: after a browser refresh or a network drop, history backfills in order. If the agent process crashed, the next message recovers it
|
|
220
|
-
- **Idle release**: agent processes with no activity exit automatically after an idle window, freeing memory
|
|
219
|
+
- **Reconnect**: after a browser refresh or a network drop, history backfills in order. If the agent process crashed, the next message recovers it when the agent declares `session/load`.
|
|
220
|
+
- **Idle release**: agent processes with no activity exit automatically after an idle window, freeing memory; idle conversations are parked and resumed by the next message via `session/load` (agents that do not declare `session/load` still need no live conversation before their process is released).
|
|
221
221
|
- **Windows works**: npm-globally-installed agents launch and get reaped correctly on Windows, leaving no stray background processes.
|
|
222
222
|
|
|
223
223
|
---
|
|
@@ -242,7 +242,7 @@ Mount it in your profile's `cordis.patch.yml`. When `cwd` / `allowedCwdRoots` ar
|
|
|
242
242
|
allowedCwdRoots: [~/.dsh/dsh-ntr/workspaces]
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
Optional agent fields: `npmPackage` (auto `npm install -g` when not found on PATH), `exposedModels` (which variants the NTR seat menu lists), `idleTimeoutMs` (idle-release window for chat processes; `0` = never release, default 30 minutes), `mcpServers` (extra MCP servers handed to the agent). Plugin-level there are also `transcriptMaxEntries` (per-conversation event buffer cap, default 600) and `probeModelsOnBoot` (kept for compatibility; boot-time per-agent probing no longer happens — see the comment on `bootstrapCatalogs`). Reliability timeouts and retries (`startupTimeoutMs`, `cancelFallbackMs`, `staleCancelRetryDelayMs`, `staleCancelMaxRetries`, `permissionTimeoutMs`, `permissionTimeoutMode`) are covered by [AGENTS.md](./AGENTS.md) constraints 12 and
|
|
245
|
+
Optional agent fields: `npmPackage` (auto `npm install -g` when not found on PATH), `exposedModels` (which variants the NTR seat menu lists), `idleTimeoutMs` (idle-release window for chat processes; `0` = never release, default 30 minutes), `mcpServers` (extra MCP servers handed to the agent). Plugin-level there are also `transcriptMaxEntries` (per-conversation event buffer cap, default 600) and `probeModelsOnBoot` (kept for compatibility; boot-time per-agent probing no longer happens — see the comment on `bootstrapCatalogs`). Reliability timeouts and retries (`startupTimeoutMs`, `cancelFallbackMs`, `staleCancelRetryDelayMs`, `staleCancelMaxRetries`, `permissionTimeoutMs`, `permissionTimeoutMode`, plus the stall watchdog's `turnStallMs` / `turnStallToolMs` / `turnStallTickMs`) are covered by [AGENTS.md](./AGENTS.md) constraints 12, 13 and 23; anything editable in the Settings page should be edited there — the three watchdog keys live in the config file only (`turnStallMs: 0` disables the whole watchdog).
|
|
246
246
|
|
|
247
247
|
`mcpServers` uses the plugin's OWN shape (every entry carries a `name` and a `transport`), not the ACP wire shape — the wire's stdio entry has no `type`, and an entry written in the wire shape is silently dropped by the agent:
|
|
248
248
|
|
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ agent 要动敏感的东西时会问你。询问卡出现在对话里、聊天
|
|
|
176
176
|
|
|
177
177
|
**agent 卡住不动了?**
|
|
178
178
|
|
|
179
|
-
可以放心点停止。插件会取消这一轮,并在 agent
|
|
179
|
+
可以放心点停止。插件会取消这一轮,并在 agent 不理会取消时强制收尾,会话不会永久卡住。agent 自己长时间无动静时,卡住的那一轮也会被收口(见 AGENTS.md 约束 23):声明了 `session/load` 的 agent,下一次发送会自动重启并恢复会话;没声明的会被重置,上下文丢失。卡的若是这条会话的首轮、且什么都没输出,锁定会回滚、该轮作废,下一条消息直接新建会话。agent 进程崩溃同理——支持恢复的会自动拉起并回放历史,不支持的要新建会话。
|
|
180
180
|
|
|
181
181
|
**agent 只回了一个空气泡?**
|
|
182
182
|
|
|
@@ -216,8 +216,8 @@ agent 要动敏感的东西时会问你。询问卡出现在对话里、聊天
|
|
|
216
216
|
- **工具活动内联**:工具调用按发生顺序插进主聊天区,思考和回答分列它两侧,不分层。
|
|
217
217
|
- **真实权限**:agent 的权限模式原样列出,它的每次权限询问也原样呈现,你答什么它收到什么。
|
|
218
218
|
- **斜杠命令归 agent**:NTR 会话里 `/` 弹出的是 agent 自己声明的命令;DSH 的同名命令不会截走你的输入。
|
|
219
|
-
- **断线重连**:浏览器刷新或断网后,历史按序补齐。agent
|
|
220
|
-
- **空闲释放**:没有活动的 agent
|
|
219
|
+
- **断线重连**:浏览器刷新或断网后,历史按序补齐。agent 进程崩了,声明了 `session/load` 的会在下次发消息时自动恢复。
|
|
220
|
+
- **空闲释放**:没有活动的 agent 进程会在空闲一段时候后自动退出,不占内存;空闲会话被挂起成可恢复状态,下一条消息经 `session/load` 恢复(只对声明了 `session/load` 的 agent 成立;没声明的仍要求没有活会话才释放进程)。
|
|
221
221
|
- **Windows 可用**:npm 全局安装的 agent 在 Windows 上也能正常启动和回收,不会残留后台进程。
|
|
222
222
|
|
|
223
223
|
---
|
|
@@ -242,7 +242,7 @@ agent 要动敏感的东西时会问你。询问卡出现在对话里、聊天
|
|
|
242
242
|
allowedCwdRoots: [~/.dsh/dsh-ntr/workspaces]
|
|
243
243
|
```
|
|
244
244
|
|
|
245
|
-
可选的 agent 字段:`npmPackage`(PATH 里找不到时自动 `npm install -g`)、`exposedModels`(NTR 座位菜单列哪些变体)、`idleTimeoutMs`(聊天进程的空闲释放窗口,`0` = 永不释放,默认 30 分钟)、`mcpServers`(额外交给 agent 连接的 MCP 服务器)。插件级还有 `transcriptMaxEntries`(会话事件缓冲上限,默认 600)与 `probeModelsOnBoot`(保留字段,启动时已不再为每个 agent 探测,见 `bootstrapCatalogs` 的注释)。可靠性超时与重试的默认值(`startupTimeoutMs`、`cancelFallbackMs`、`staleCancelRetryDelayMs`、`staleCancelMaxRetries`、`permissionTimeoutMs`
|
|
245
|
+
可选的 agent 字段:`npmPackage`(PATH 里找不到时自动 `npm install -g`)、`exposedModels`(NTR 座位菜单列哪些变体)、`idleTimeoutMs`(聊天进程的空闲释放窗口,`0` = 永不释放,默认 30 分钟)、`mcpServers`(额外交给 agent 连接的 MCP 服务器)。插件级还有 `transcriptMaxEntries`(会话事件缓冲上限,默认 600)与 `probeModelsOnBoot`(保留字段,启动时已不再为每个 agent 探测,见 `bootstrapCatalogs` 的注释)。可靠性超时与重试的默认值(`startupTimeoutMs`、`cancelFallbackMs`、`staleCancelRetryDelayMs`、`staleCancelMaxRetries`、`permissionTimeoutMs`、`permissionTimeoutMode`,以及卡死看门狗的 `turnStallMs` / `turnStallToolMs` / `turnStallTickMs`)见 [AGENTS.md](./AGENTS.md) 约束 12、13 与 23;设置页能改的都在设置页改,看门狗三个键只在配置文件里(`turnStallMs: 0` 关闭整个看门狗)。
|
|
246
246
|
|
|
247
247
|
`mcpServers` 是**插件自己的形状**(每条必带 `name` 与 `transport`),不是 ACP 线格式——线格式里 stdio 那条不带 `type`,照线格式手写会被 agent 静默丢弃:
|
|
248
248
|
|
package/cordis.patch.yml
CHANGED
|
@@ -88,6 +88,18 @@
|
|
|
88
88
|
# cancelFallbackMs: 15000 # force-finalize a turn the agent ignores after session/cancel (0 = off)
|
|
89
89
|
# staleCancelRetryDelayMs: 600 # resend a prompt answered cancelled with no cancel requested (0 = at once)
|
|
90
90
|
# staleCancelMaxRetries: 2 # cap on those resends before the cancelled stop is reported as-is
|
|
91
|
+
# turnStallMs: 600000 # inactivity watchdog: finalize a turn the agent
|
|
92
|
+
# went silent in for this long (0 = disable the
|
|
93
|
+
# WHOLE watchdog, tool window included). It
|
|
94
|
+
# finalizes the TURN only — the process is NOT
|
|
95
|
+
# killed; the next message reclaims the session
|
|
96
|
+
# (releaseAll + session/load, or a reset when
|
|
97
|
+
# the agent cannot load).
|
|
98
|
+
# turnStallToolMs: 1800000 # the same window while ANY ACP tool call is
|
|
99
|
+
# still active by id (parallel calls count as a
|
|
100
|
+
# set); 0 = fall back to turnStallMs
|
|
101
|
+
# turnStallTickMs: 30000 # how often the watchdog scans; tuning / tests
|
|
102
|
+
# only, there is no settings-page control
|
|
91
103
|
# ACP 模式 (agent preset) is declared by this package's own bundle
|
|
92
104
|
# patch list (package.json `dsh.bundle.patch` → presets/acp/acp.patch.yml),
|
|
93
105
|
# so it needs no install step and has no config knob. The settings card
|