dsh-ntr 0.3.0 → 0.3.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.
Files changed (51) hide show
  1. package/README.en.md +1 -1
  2. package/README.md +1 -1
  3. package/cordis.patch.yml +17 -1
  4. package/lib/bridge.js +614 -25
  5. package/lib/client/acp-ui.js +103 -3
  6. package/lib/client/acp-view.js +24 -4
  7. package/lib/client/branch-action.js +133 -0
  8. package/lib/client/composer-mode.js +48 -13
  9. package/lib/client/context-meter.js +86 -0
  10. package/lib/client/index.js +238 -15
  11. package/lib/client/panel.js +127 -30
  12. package/lib/client/released-banner.js +66 -0
  13. package/lib/client/session-controls.js +38 -13
  14. package/lib/client/slash-isolation.js +2 -2
  15. package/lib/client/store.js +403 -16
  16. package/lib/client.js +1267 -70
  17. package/lib/client.js.map +1 -1
  18. package/lib/impl.js +54 -1
  19. package/lib/index.js +7 -0
  20. package/lib/protocol.js +19 -0
  21. package/lib/types/bridge.d.ts +230 -7
  22. package/lib/types/client/acp-ui.d.ts +34 -2
  23. package/lib/types/client/acp-view.d.ts +13 -2
  24. package/lib/types/client/branch-action.d.ts +40 -0
  25. package/lib/types/client/composer-mode.d.ts +28 -0
  26. package/lib/types/client/context-meter.d.ts +51 -0
  27. package/lib/types/client/released-banner.d.ts +34 -0
  28. package/lib/types/client/slash-isolation.d.ts +1 -1
  29. package/lib/types/client/store.d.ts +131 -1
  30. package/lib/types/impl.d.ts +41 -1
  31. package/lib/types/protocol.d.ts +130 -0
  32. package/lib/types/update.d.ts +7 -4
  33. package/lib/update.js +25 -10
  34. package/package.json +2 -1
  35. package/src/bridge.ts +645 -27
  36. package/src/client/acp-ui.tsx +123 -2
  37. package/src/client/acp-view.tsx +30 -5
  38. package/src/client/branch-action.tsx +160 -0
  39. package/src/client/composer-mode.tsx +59 -13
  40. package/src/client/context-meter.tsx +128 -0
  41. package/src/client/index.tsx +265 -14
  42. package/src/client/panel.tsx +229 -41
  43. package/src/client/primitives.d.ts +27 -0
  44. package/src/client/released-banner.tsx +97 -0
  45. package/src/client/session-controls.tsx +34 -11
  46. package/src/client/slash-isolation.ts +2 -1
  47. package/src/client/store.ts +463 -20
  48. package/src/impl.ts +84 -2
  49. package/src/index.ts +8 -0
  50. package/src/protocol.ts +129 -0
  51. package/src/update.ts +21 -8
package/README.en.md CHANGED
@@ -217,7 +217,7 @@ That's stale dependency state, not a missing plugin file: the failing path will
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
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).
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). The window is adjusted in the settings page under “Processes” (1-60 minutes, 30 by default); a single agent can override it in its own “Advanced” section.
221
221
  - **Windows works**: npm-globally-installed agents launch and get reaped correctly on Windows, leaving no stray background processes.
222
222
 
223
223
  ---
package/README.md CHANGED
@@ -217,7 +217,7 @@ agent 要动敏感的东西时会问你。询问卡出现在对话里、聊天
217
217
  - **真实权限**:agent 的权限模式原样列出,它的每次权限询问也原样呈现,你答什么它收到什么。
218
218
  - **斜杠命令归 agent**:NTR 会话里 `/` 弹出的是 agent 自己声明的命令;DSH 的同名命令不会截走你的输入。
219
219
  - **断线重连**:浏览器刷新或断网后,历史按序补齐。agent 进程崩了,声明了 `session/load` 的会在下次发消息时自动恢复。
220
- - **空闲释放**:没有活动的 agent 进程会在空闲一段时候后自动退出,不占内存;空闲会话被挂起成可恢复状态,下一条消息经 `session/load` 恢复(只对声明了 `session/load` 的 agent 成立;没声明的仍要求没有活会话才释放进程)。
220
+ - **空闲释放**:没有活动的 agent 进程会在空闲一段时候后自动退出,不占内存;空闲会话被挂起成可恢复状态,下一条消息经 `session/load` 恢复(只对声明了 `session/load` 的 agent 成立;没声明的仍要求没有活会话才释放进程)。窗口在设置页「进程管理」里调(1-60 分钟,默认 30 分钟),单个智能体可在其「高级」里单独覆盖。
221
221
  - **Windows 可用**:npm 全局安装的 agent 在 Windows 上也能正常启动和回收,不会残留后台进程。
222
222
 
223
223
  ---
package/cordis.patch.yml CHANGED
@@ -100,6 +100,21 @@
100
100
  # set); 0 = fall back to turnStallMs
101
101
  # turnStallTickMs: 30000 # how often the watchdog scans; tuning / tests
102
102
  # only, there is no settings-page control
103
+ # idleTimeoutMs: 1800000 # how long a chat process may sit idle before
104
+ # it is released (parked, then resumed by the
105
+ # next message). 0 = never release. The
106
+ # DEPLOYMENT baseline: the settings page's
107
+ # 「进程管理」 tab (NTR 设置 → 进程管理) edits
108
+ # this window on a 1-60 minute slider and
109
+ # persists its pick in the plugin's own state
110
+ # file, which OUTRANKS the value here; the card
111
+ # shows what this file asks for and offers a
112
+ # reset back to it. A per-agent
113
+ # `agents[].idleTimeoutMs` still wins over both —
114
+ # that promise is about the agent. The PROBE
115
+ # window is a separate thing and stays fixed at 5
116
+ # minutes: a process that never hosted a session
117
+ # has no stake in a chat window.
103
118
  # ACP 模式 (agent preset) is declared by this package's own bundle
104
119
  # patch list (package.json `dsh.bundle.patch` → presets/acp/acp.patch.yml),
105
120
  # so it needs no install step and has no config knob. The settings card
@@ -125,7 +140,8 @@
125
140
  # exposedModels: [model-a, model-b] # opt-in `agent@choice` variants; unset/[] = base entry only
126
141
  # idleTimeoutMs: 1800000 # release a chat process once it has been idle
127
142
  # # this long (ms) with NO live session
128
- # # (0 = never; unset = 30 min). This window
143
+ # # (0 = never; unset = follow the plugin-level
144
+ # # `idleTimeoutMs` above). This window
129
145
  # # applies ONLY to a process that has hosted a
130
146
  # # session: a probe child (`everHostedSession`
131
147
  # # false — what a model probe or a post-save