@dsmm/dsmm 0.3.15 → 0.3.16
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 +11 -5
- package/docs/agent-presets.md +1 -1
- package/docs/compatibility.md +3 -3
- package/docs/deferred-native-approval-risk.md +1 -1
- package/docs/design.md +1 -1
- package/docs/lsp.md +1 -1
- package/docs/model-routing.md +13 -6
- package/docs/native-permissions.md +1 -1
- package/docs/profiles.md +3 -1
- package/docs/roadmap.md +2 -2
- package/docs/runtime-recovery.md +4 -4
- package/docs/safety-guards.md +1 -1
- package/docs/settings-status.md +4 -2
- package/docs/tui.md +53 -0
- package/dsh-plugin.json +41 -0
- package/lib/client/ProfilesSection.js +1 -1
- package/lib/client/SessionProfiles.js +8 -7
- package/lib/client/children-locales.d.ts +1 -1
- package/lib/client/controller.d.ts +13 -1
- package/lib/client/controller.js +114 -20
- package/lib/client/deployment-locales.js +3 -2
- package/lib/client/deployment-modules.js +1 -1
- package/lib/client/index.js +22 -4
- package/lib/client/locales.d.ts +1 -0
- package/lib/client/locales.js +2 -0
- package/lib/client.js +144 -29
- package/lib/commands.d.ts +7 -3
- package/lib/commands.js +20 -11
- package/lib/host-llm.js +6 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -6
- package/lib/model-routing.js +43 -19
- package/lib/profile-diagnostics.js +1 -0
- package/lib/profile-runtime.js +1 -1
- package/lib/request-routing.d.ts +27 -0
- package/lib/request-routing.js +69 -0
- package/lib/role-llm-runtime.js +15 -2
- package/lib/role-routing.d.ts +4 -3
- package/lib/role-routing.js +17 -10
- package/lib/runtime-recovery.js +56 -16
- package/lib/settings.d.ts +3 -0
- package/lib/settings.js +9 -0
- package/lib/state.d.ts +2 -2
- package/lib/state.js +13 -4
- package/lib/status.d.ts +5 -0
- package/lib/status.js +18 -7
- package/lib/tui-actions.d.ts +21 -0
- package/lib/tui-actions.js +301 -0
- package/lib/tui-adapter.d.ts +25 -0
- package/lib/tui-adapter.js +422 -0
- package/lib/tui-types.d.ts +98 -0
- package/lib/tui-types.js +2 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -4,10 +4,10 @@ DSMM 是 DeepSeek Harness(DSH)的插件。它让不同 Agent 分工处理任
|
|
|
4
4
|
|
|
5
5
|
比如,让 Planner 拆解任务、Coding 写代码、Reviewer 检查结果,再由 Orchestrator 协调。各个角色可以用不同的模型,不必共用一套配置。
|
|
6
6
|
|
|
7
|
-
当前发布版本为 `@dsmm/dsmm@0.3.
|
|
7
|
+
当前发布版本为 `@dsmm/dsmm@0.3.16`,支持 DSH `0.2.1-rc.2`。安装前请确认客户端版本;其他 DSH 版本暂不在支持范围内。Desktop 使用自带运行时,独立命令行环境需要 Node.js 22 或更高版本。
|
|
8
8
|
|
|
9
9
|
- 源码仓库:[hugefiver/dsmm](https://github.com/hugefiver/dsmm)
|
|
10
|
-
- 发布地址:[GitHub Releases (v0.3.
|
|
10
|
+
- 发布地址:[GitHub Releases (v0.3.16)](https://github.com/hugefiver/dsmm/releases/tag/v0.3.16) 与 [npm (@dsmm/dsmm)](https://www.npmjs.com/package/@dsmm/dsmm)
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ DSMM 是 DeepSeek Harness(DSH)的插件。它让不同 Agent 分工处理任
|
|
|
16
16
|
### 初次安装
|
|
17
17
|
|
|
18
18
|
1. 打开 DeepSeek Harness Desktop,进入 **插件(Plugins)** 页面。
|
|
19
|
-
2. 点击 **添加插件(Add plugin)**,输入 `@dsmm/dsmm@0.3.
|
|
19
|
+
2. 点击 **添加插件(Add plugin)**,输入 `@dsmm/dsmm@0.3.16` 并确认。
|
|
20
20
|
3. 安装完成后,检查插件是否处于启用状态。如果界面提示需要重启,请按提示重启客户端。
|
|
21
21
|
|
|
22
22
|
Desktop 的插件由客户端自己管理。全局 npm 安装和独立 npm 版 `dsh` 命令不能替代这一步。
|
|
@@ -28,7 +28,7 @@ DSH Desktop 当前不支持在界面中用同名版本原位覆盖更新插件
|
|
|
28
28
|
1. 保存好正在进行的任务,**正常退出并完全关闭 DSH Desktop**。
|
|
29
29
|
2. 使用 Desktop 安装自带的命令行工具更新配置。以下示例适用于 Windows 默认安装路径(`%LOCALAPPDATA%\Programs\DeepSeek Harness\`):
|
|
30
30
|
```powershell
|
|
31
|
-
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add @dsmm/dsmm@0.3.
|
|
31
|
+
& "$env:LOCALAPPDATA\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd" plugin --profile desktop add @dsmm/dsmm@0.3.16 --save-exact --ignore-scripts --registry=https://registry.npmjs.org
|
|
32
32
|
```
|
|
33
33
|
*若安装在自定义路径,请替换为对应的实际位置;非 Windows 系统请参考 Desktop 自身菜单或官方指引,不要混用非 Desktop 的独立 CLI 命令。*
|
|
34
34
|
3. 重新打开 DSH Desktop 即可加载新版本。
|
|
@@ -67,7 +67,7 @@ DSMM 包含两处相互独立的配置区域:
|
|
|
67
67
|
- **在当前会话中应用方案(Apply profile to current session)**:在已有对话历史的原生会话中直接更换预设方案。
|
|
68
68
|
- 会话必须处于真正空闲状态:无正在生成的回复、无排队输入、无待处理审批且无运行中的子任务。界面单独显示 `idle` 状态并不代表没有后台活动,需等待所有操作完全结束。
|
|
69
69
|
- 切换成功后,已存在的旧子任务继续保留启动时的原配置与限制,后续新委派的子任务才会使用新方案。
|
|
70
|
-
- **使用方案模型(Use profile model
|
|
70
|
+
- **使用方案模型(Use profile model)**:把当前会话的原生模型选择切换为方案中配置的主模型。默认的 `rootModelPolicy: native` 下,保存或切换方案不会自动改模型;要一起换模型,需要明确点击这个操作。操作期间如果又手动选择了模型,以较新的选择为准。
|
|
71
71
|
|
|
72
72
|
### 配置角色模型与参数
|
|
73
73
|
|
|
@@ -77,6 +77,12 @@ DSMM 包含两处相互独立的配置区域:
|
|
|
77
77
|
- **推理强度与参数**:按模型支持的选项填写,例如 medium 或 high。不同模型接受的值可能不同,不能把同一组档位套在所有模型上。
|
|
78
78
|
- **备用路由(Fallback Routes)**:当主模型不可用时依次尝试的候选通道(最多支持 32 个备用路由)。
|
|
79
79
|
|
|
80
|
+
### 在 dsh-TUI 中使用
|
|
81
|
+
|
|
82
|
+
终端适配提供 `/dsmm` 操作菜单、简单设置和已保存方案的选择,不另做复杂配置编辑器。DSMM 必须加载在 TUI 实际使用的 profile 中,Desktop 中已安装的插件不会自动共用。
|
|
83
|
+
|
|
84
|
+
如果希望根会话也完全按配置中的主模型和备用路由运行,可在 TUI 的部署配置中将 `rootModelPolicy` 设为 `configured`。它影响同一部署中的所有客户端,具名方案不能覆盖这个策略;其他独立部署默认仍使用原生模型选择。具体版本要求、配置范围和联调限制见 [TUI 使用说明](docs/tui.md)。
|
|
85
|
+
|
|
80
86
|
---
|
|
81
87
|
|
|
82
88
|
## 权限和后台任务
|
package/docs/agent-presets.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork Agent presets and child control
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Native package composition and callable admission are separate requirements.
|
|
4
4
|
|
|
5
5
|
## Roles and composition
|
|
6
6
|
|
package/docs/compatibility.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM compatibility and upgrade boundaries
|
|
2
2
|
|
|
3
|
-
**DSMM 0.3.
|
|
3
|
+
**DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`** and Node.js 22 or later. Older SDKs and automatically drifting versions aren't supported targets.
|
|
4
4
|
|
|
5
5
|
## Supported integration
|
|
6
6
|
|
|
@@ -22,7 +22,7 @@ Core configuration and native permissions work without a session or active Deepw
|
|
|
22
22
|
|
|
23
23
|
Global and exact native-profile saves are independent. Native form identity/revision and base/user provenance are required; no fallback Global write or cross-layer transaction is implied. Named documents, future-default pointers and actual admission remain separate. Desired saves don't change mounted capability or a running Agent's policy. Without a session, actual admission is unknown.
|
|
24
24
|
|
|
25
|
-
Save and future-default selection remain available under their own authority. Native **Use profile model** and **Deepwork mode** have independent capabilities. Use profile model consumes the admitted configuration and respects newer native manual model/effort intent, including same-value reselection.
|
|
25
|
+
Save and future-default selection remain available under their own authority. Native **Use profile model** and **Deepwork mode** have independent capabilities. Use profile model consumes the admitted configuration and respects newer native manual model/effort intent, including same-value reselection. With the default `rootModelPolicy: "native"`, root requests retain native assembled selection/defaults; refreshing an admission does not implicitly apply its profile primary or authorize a root fallback channel. Explicit deployment policy `configured` instead gives eligible admitted roots configuration-led primary/fallback routing. It applies equally to Web and TUI roots in that deployment, not by detecting a client; named profiles cannot override the policy. See [model routing](model-routing.md), [Profiles](profiles.md) and [settings/status](settings-status.md).
|
|
26
26
|
|
|
27
27
|
Stores use separate CAS and atomic-write boundaries. Committed saves aren't rolled back in the response because observation/notification failed: report refresh-required or unsynchronized status. An unconfirmed native mutation requires authoritative reread before retry. Operator, connection and owner lifetime remain valid through precommit; client claims or loopback-looking URLs don't authorize writes.
|
|
28
28
|
|
|
@@ -50,7 +50,7 @@ Standard supported model calls use native prepared calls. Raw/custom and Pi-AI s
|
|
|
50
50
|
|
|
51
51
|
## Retired compatibility surfaces
|
|
52
52
|
|
|
53
|
-
No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.
|
|
53
|
+
No old SDK branch, legacy-read host, cold-profile migration, session repair or custom-owner selector is a 0.3.16 activation path. Old libraries, captures and unmarked history aren't copied, rewritten, repaired or adopted by same-name fallback. Retired brand calibration/default-effort and MaxReasoningPresets fields reject with `deprecated-field`; edit configuration deliberately using generic routes and parameters.
|
|
54
54
|
|
|
55
55
|
Published **0.3.0 retains its rc.1 identity**, immutable tag, package, assets and version-bound receipt grammar. Historical release controls interpret those records under their original identity, not as a runtime compatibility branch.
|
|
56
56
|
|
package/docs/design.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM native architecture
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. It supplies Core configuration and native permission integration plus optional Deepwork roles, routing and skills.
|
|
4
4
|
|
|
5
5
|
## Native integration boundary
|
|
6
6
|
|
package/docs/lsp.md
CHANGED
|
@@ -39,6 +39,6 @@ An independently mounted native MCP client using `serverName: dsmm_lsp` uses the
|
|
|
39
39
|
|
|
40
40
|
DSMM's read-only role restrictions don't grant rename or format permission. The retained `lspRuntime` status interface reports bounded state, diagnostic codes and tool names, not executable paths, arguments or environment values. Tool discovery alone doesn't prove language-server availability or a successful symbol query.
|
|
41
41
|
|
|
42
|
-
DSMM 0.3.
|
|
42
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Automatic external LSP mounting isn't delivered; the retained interface inventory isn't an activation path.
|
|
43
43
|
|
|
44
44
|
DSH's native definition/references/implementation/hover surface isn't a promise of diagnostics, rename or format. The retained external interface above doesn't expand that native scope. Independently managed MCP users must verify actual executable and language-server availability; DSMM doesn't certify or repair that environment.
|
package/docs/model-routing.md
CHANGED
|
@@ -2,11 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Providers, accounts and credentials remain native DSH configuration, never named-profile contents.
|
|
4
4
|
|
|
5
|
-
DSMM 0.3.
|
|
5
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Standard calls use native prepared calls. The public Pi-AI completions seam supports self-contained literal and explicit model-mapping raw configurations; unsupported catalog-backed raw combinations are rejected without affecting standard calls.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Root policy and child defaults
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`rootModelPolicy` is a deployment setting with two values:
|
|
10
|
+
|
|
11
|
+
- **`native` (default):** roots retain native assembled provider/model/effort, including implicit defaults before the first `model/selection` event. Activating Deepwork, choosing a preset, saving/selecting a profile or refreshing a cold admission does not implicitly apply a root primary. **Use profile model** is the explicit native selection action against admitted configuration; later manual choices remain authoritative. Root retry preserves the native downstream configuration and does not automatically select a profile fallback channel.
|
|
12
|
+
- **`configured`:** admitted roots with Deepwork enabled and an effective DSMM role use that role's configured primary and ordered fallback routes. Without an explicit primary, the initial route inherits the native baseline. Ordinary sessions with Deepwork mode off and no effective DSMM role retain native routing. Configuration does not grant a role, enable a disabled module or bypass native capability checks.
|
|
13
|
+
|
|
14
|
+
Global and native-profile configuration may set this policy; named profiles cannot override it. Clearing a native-profile override restores inheritance from Global. The policy applies to the deployment, not to a detected client: a Web session in the same configured deployment follows it too. A separate Desktop deployment retains the default `native` behavior. Saving desired configuration does not replace an existing Agent's immutable admission; use the existing admission lifecycle to adopt changes.
|
|
15
|
+
|
|
16
|
+
Configured routing changes the actual request, not the native model picker or its saved preference. An explicit primary takes precedence over a picker selection; inherited routing still uses the native baseline. Neither switching profiles nor automatic fallback writes the native model preference. Status distinguishes the admitted policy and actual route from a declared model.
|
|
10
17
|
|
|
11
18
|
`roleRouting` is keyed by canonical IDs such as `dsmm-reviewer`, not tool names or labels. Each entry accepts `primary`, ordered `fallbackRoutes`, `strategy`, bounded `rateLimit`, and `levels`. Omitted primary inherits the native parent route for a child. Explicit host options on new delegation retain their priority. Historical descriptor options are reconstruction defaults, not a new override of current DSMM routing. A cold child resolves its invocation again, taking its own explicit native selection before configured-route preparation; a configured model that will not be used is not a preflight dependency. Ancestor selections, labels and old request defaults are not child selection intent.
|
|
12
19
|
|
|
@@ -33,7 +40,7 @@ These identifiers are placeholders for resolvable routes. Native model selection
|
|
|
33
40
|
|
|
34
41
|
`modelParameters.passthrough` is an ordinary Core setting, defaulting to `true`, resolved through Global, explicit native profile and admitted named overlays. It's independent of Deepwork enablement and doesn't prove that a raw executor is installed. Save and future-default selection preserve the original JSON; each admitted Agent keeps its immutable policy.
|
|
35
42
|
|
|
36
|
-
With passthrough **ON**, applicable routes retain bounded opaque JSON for a supported raw adapter. With **OFF**, opaque/custom parameters remain stored but aren't sent, and configured effort doesn't override native defaults.
|
|
43
|
+
With passthrough **ON**, applicable routes retain bounded opaque JSON for a supported raw adapter. With **OFF**, opaque/custom parameters remain stored but aren't sent, and configured effort doesn't override native defaults. Native-root model/effort choices and child selection retain their existing authority; `rootModelPolicy: "configured"` explicitly selects configuration-led root routing instead. OFF doesn't erase configuration or force replacement effort.
|
|
37
44
|
|
|
38
45
|
Standard requests that the native adapter can fully express and consume use native `LlmRuntime.prepareCall`: route, defaults, validation, adapter generation and single dispatch remain native-owned. A synchronous configure callback can't change the captured route. An earlier `resolveCallConfig` query isn't a generation credential for later execution. Native catalog/model APIs remain the directory; DSMM doesn't add another model registry or scheduler.
|
|
39
46
|
|
|
@@ -85,11 +92,11 @@ Entries contain only currently admitted targets of the correct kind. Exact calle
|
|
|
85
92
|
|
|
86
93
|
## Locks, fallback and capture
|
|
87
94
|
|
|
88
|
-
Child preparation
|
|
95
|
+
Child preparation and eligible configured-root preparation select the primary or first resolvable configured candidate in order without a sacrificial request. No admissible candidate produces a visible no-request refusal, not silent baseline routing. Explicit `fallbackRoutes:[]` disables inheritance of a fallback chain. Omitted role strategy/retry fields inherit `runtimePolicy`; `startup-lock` is the default.
|
|
89
96
|
|
|
90
97
|
`startup-lock` keeps the admitted route across turns and bounded positively no-output-safe `RATE_LIMIT` retries. `rate-limit-fallback` may advance the ordered chain after the configured threshold, within finite switch/delay limits. Counters and locks aren't shared between roles or sessions; duplicate errors don't count twice, success resets consecutive counts, and exhausted chains don't wrap.
|
|
91
98
|
|
|
92
|
-
Only provider absence established through the public registration directory, or adapter-proven `UNKNOWN_MODEL`, can advance a remaining startup candidate before accepted output/tool fragments. A generic `NO_ADAPTER` from preparation, middleware or an unready registered adapter is not absence proof. Transport, authorization, quota, payment, context and cancelled failures don't authorize model hopping. Partial text, reasoning or tool output forbids automatic retry, including same-route retry.
|
|
99
|
+
Only provider absence established through the public registration directory, or adapter-proven `UNKNOWN_MODEL`, can advance a remaining startup candidate before accepted output/tool fragments. A generic `NO_ADAPTER` from preparation, middleware or an unready registered adapter is not absence proof. Transport, authorization, quota, payment, context and cancelled failures don't authorize model hopping. Partial text, reasoning or tool output forbids automatic retry, including same-route retry. Roots using `native` remain on their native route; eligible `configured` roots use the same bounded fallback rules as configured role routing. See [runtime recovery](runtime-recovery.md).
|
|
93
100
|
|
|
94
101
|
Resident Agents and freshly delegated children use immutable admitted policy, not a later draft or desired deployment. Cold continuation obtains current policy at its new activation. Child initial routes don't override later accepted native manual intent or valid fallback every turn. Omitted effort clears stale explicit effort. Profile storage, native persistence and execution ownership remain separate; see [profiles](profiles.md#storage-and-lifetime) and [compatibility](compatibility.md).
|
|
95
102
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Native permissions
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. In the current runtime, DSH owns approval; DSMM composes policy into the native tool pipeline without a second approval queue or UI. DSMM command-rule approval memory is limited to the exact live Agent and is distinct from native once grants.
|
|
4
4
|
|
|
5
5
|
## Permission architecture and extension target
|
|
6
6
|
|
package/docs/profiles.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork runtime profiles
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. See [compatibility](compatibility.md) for installation boundaries.
|
|
4
4
|
|
|
5
5
|
A named Deepwork profile is a runtime-policy document, not a native deployment profile or Agent preset. Open **Settings → Deepwork Profiles** to browse and edit it. Native **Plugins → DSMM** edits deployment layers instead, as described in [settings and status](settings-status.md).
|
|
6
6
|
|
|
@@ -21,6 +21,8 @@ The root and its resident descendants must have no running work, open turn, queu
|
|
|
21
21
|
|
|
22
22
|
The compact Conversation header menu shows the current admission separately from the future default. **Use profile model** asks native model selection to use the admitted immutable configuration's declared main model, not a later saved draft. It doesn't write an overlay pointer or increment the admission epoch. Native model-default persistence follows the Models tab; newer manual model or effort intent, including same-value reselection, wins. `canSelectModel`, `canToggleMode` and `canApplyOverlay` have independent reasons: unavailable live Apply doesn't disable ordinary model selection or mode switching.
|
|
23
23
|
|
|
24
|
+
`rootModelPolicy` is a separate deployment setting, not a named-profile field. The default `native` keeps the native model choice authoritative. With `configured`, an eligible root's requests use the effective role routing from its admitted configuration; applying a named profile can therefore change the next request's primary/fallback routes without changing the native model picker. Named profiles cannot turn this deployment policy on or off. A Web session and a TUI session in the same deployment follow the same policy. See [root routing policy](model-routing.md#root-policy-and-child-defaults).
|
|
25
|
+
|
|
24
26
|
Without a current session, choose a workspace and a saved profile or deployment defaults in the header menu or Settings session scope. Choosing a profile first keeps that choice pending until a workspace is explicitly selected. Browsing, refreshing and editing profiles do not create sessions, and the first workspace is never selected automatically. On explicit selection, the native workspace service creates or reuses a blank session; DSMM retains it, blocks sending while configuration is unconfirmed, completes the existing selection transaction and only then opens the confirmed session. This does not change the future default or native model.
|
|
25
27
|
|
|
26
28
|
Preparation keeps native draft ownership: DSMM does not copy or reconstruct text, references or attachments. A later navigation, service replacement or disposal prevents an old result from opening a session. An unknown selection result requires rereading the same target, not automatically creating another session or resubmitting the choice. If connection fails before a session ID is returned, use native workspace navigation to inspect the result. Full Host-level draft/attachment continuity remains a separate integration acceptance requirement.
|
package/docs/roadmap.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Version policy
|
|
4
4
|
|
|
5
|
-
**DSMM 0.3.
|
|
5
|
+
**DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`.** Each DSMM version targets the published DSH RC or stable release selected for that version. Older SDKs and old configuration schemas aren't runtime compatibility targets. Loading sessions created by DSMM `0.2.x` is a required compatibility target, separate from retaining old runtime implementations or execution behavior. A newer upstream release requires deliberate reassessment, not an automatic dependency or runtime switch.
|
|
6
6
|
|
|
7
7
|
Published `0.3.0` retains its original rc.1 package, tag, assets and version-bound release identity.
|
|
8
8
|
|
|
@@ -132,4 +132,4 @@ As of 2026-10-23, the public [DSH master comparison](https://github.com/deepseek
|
|
|
132
132
|
|
|
133
133
|
## Publication and Desktop installation
|
|
134
134
|
|
|
135
|
-
0.3.
|
|
135
|
+
0.3.16 publication uses the version-bound [release controls](releasing.md). Desktop plugin installation follows publication, uses the Desktop-owned carrier and requires exact DSH `0.2.1-rc.2`. Installation doesn't authorize upgrading the Host, changing credentials or real sessions, altering unrelated configuration, or restarting active work. An incompatible Host or required data migration blocks installation rather than expanding its scope.
|
package/docs/runtime-recovery.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Runtime recovery and route strategies
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`.
|
|
4
4
|
|
|
5
5
|
## Independent role strategies
|
|
6
6
|
|
|
7
7
|
Each role may use `startup-lock` (default) or explicit `rate-limit-fallback`. `runtimePolicy` supplies inherited defaults; role `strategy` / `rateLimit` overrides only explicit fields. Profiles contain no native accounts or credentials.
|
|
8
8
|
|
|
9
|
-
Child preparation
|
|
9
|
+
Child preparation and eligible configured-root preparation admit the primary or first resolvable configured candidate in order without a sacrificial completion. A catalog isn't an authentication/network-health check. `startup-lock` retains the admitted route for bounded safe rate-limit retries. `rate-limit-fallback` may advance its ordered chain after the configured threshold. Success resets consecutive counts, duplicate failure delivery doesn't count twice, and exhausted chains don't wrap.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
With the default deployment policy `rootModelPolicy: "native"`, root model and effort remain native-owned even without an explicit selection event. Role/global primaries and fallback chains do not implicitly replace that route. Under explicit `configured` policy, eligible admitted roots use role primary/fallback routing and the same bounded recovery rules. This does not depend on a TUI management service being present. **Use profile model** remains an explicit native selection action, not a retry or overlay Apply. A role child's own native selection is resolved before configured-primary preflight when it resumes; its historical descriptor default does not replace that selection.
|
|
12
12
|
|
|
13
13
|
| Policy field | Default | Strict integer bound |
|
|
14
14
|
| --- | --- | --- |
|
|
@@ -33,7 +33,7 @@ Fallback decisions stay in the native request loop. DSMM doesn't create another
|
|
|
33
33
|
|
|
34
34
|
An abortable middleware delay can honor valid `providerRetryAfterMs` only within per-delay and total budgets. Cancellation, owner/provider retirement, closed turn/step boundaries or superseded intent invalidate pending work before another dispatch. Duplicate errors can't reserve a second fallback.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
For native-root routing and child selection, native model selection, including same-value reselection, is new intent. Assembly captures that intent for the request; a concurrently newer selection belongs to the next assembly, not a retrofit. Child initial routes are defaults, not every-turn overrides of accepted native intent or valid fallback. A configured root's native picker intent does not override its explicit primary, expand configured fallback candidates or reset retry budgets. Existing Agents consume admitted policy, not later saved desired configuration. The same request decision captures admission, role, mode revision and policy before recovery preparation, and remains checked through provider awaits and retries. See [model routing](model-routing.md).
|
|
37
37
|
|
|
38
38
|
## Live continuation and activation
|
|
39
39
|
|
package/docs/safety-guards.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# DSMM Safety Guards
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Its guards use `tools/pre-execute` for allow, deny and ask decisions, and `tools/post-execute` for accepted-result truncation. They don't use OpenCode hook names or mutate tool arguments. Deployment overrides belong in the `id: dsmm` Loader entry's `config` object, not a settings.yaml namespace.
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
package/docs/settings-status.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deepwork settings and status
|
|
2
2
|
|
|
3
|
-
DSMM 0.3.
|
|
3
|
+
DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Named policy is covered in [profiles](profiles.md), routing in [model routing](model-routing.md), and child authority in [Agent presets](agent-presets.md).
|
|
4
4
|
|
|
5
5
|
## Deployment layers and native editors
|
|
6
6
|
|
|
@@ -36,6 +36,8 @@ On a mounted Host, desired-off affects new root admissions and cold role continu
|
|
|
36
36
|
|
|
37
37
|
The inspector separates merged desired, startup-mounted/captured, next-root preview, and current-session admission. Without an actual session, current admission is unknown. Host bundle enablement also remains unknown when the public interface can't observe it. Sources, capture origins, global file version, native descriptor version and named snapshot reference aren't one acknowledgment.
|
|
38
38
|
|
|
39
|
+
`rootModelPolicy` is deployment-only: Global and native-profile accept `native` (default) or `configured`; named overlays reject it. An explicit native-profile value overrides Global, and Unset restores inheritance. The policy is captured with admission rather than startup-pinned: saving changes desired configuration, not an existing Agent's captured policy. `configured` enables configuration-led routing for admitted roots with an effective DSMM role and Deepwork module enabled, regardless of whether their client is Web or TUI. It does not enable a module or grant a role. Status reports the captured value and its source only when admission is known; see [root routing policy](model-routing.md#root-policy-and-child-defaults).
|
|
40
|
+
|
|
39
41
|
`presets` only carries materialization settings (`materialize`, optional `root`). The dispatcher is the only standing root; there is no per-role root switch, and named overlays cannot configure presets. See [roles and composition](agent-presets.md#roles-and-composition) for the selection roster, forced creation/resume and read-only boundaries.
|
|
40
42
|
|
|
41
43
|
`permissionControl.enabled` defaults true independently of Deepwork. Permission settings are deployment-only: Global and native-profile settings may save them, while named/session overlays cannot. Only `enabled` is startup-pinned: live saves do not remount or change its admitted value, including for newly created roots; a difference is reported as `permissionControl.enabled` restart-required. A separate cold start captures the new toggle. Dynamic outside-read, web and persistent rules require runtime revision synchronization rather than restart. OFF does not disable Core guards, readonly, native sandbox/approval or tool filters. Configuration and startup admission do not establish that a permission executor is mounted or synchronized. Actual native standing `danger-full-access` is full access: DSMM adds no ask, downgrade, path permit or refusal for unknown operations or missing classification facts. Only a deterministically matched existing explicit deny blacklist may produce a native pre-approval denial. A requested mode or configured command target alone isn't effective native authority. See [native permissions](native-permissions.md).
|
|
@@ -58,7 +60,7 @@ Only relevant effective permission changes coordinate revocation. Unrelated loca
|
|
|
58
60
|
|
|
59
61
|
`canSelectModel`, `canToggleMode` and `canApplyOverlay` describe independent actions and refusal reasons. Live overlay Apply is unavailable (`new-session-required`); save/select a future default for a new session. This doesn't disable ordinary mode changes or **Use profile model** where their own native service, idle/session identity and manual-intent checks pass. Use profile model selects from admitted immutable configuration, doesn't write a profile pointer, and respects a newer manual choice even when its value is unchanged.
|
|
60
62
|
|
|
61
|
-
`/dsmm-status` reports normalized bounded state; `/dsmm-status json` returns a defensive version-1 snapshot. Status separates admitted profile/revision/epoch, actual route state, effective settings and captured module/runtime binding.
|
|
63
|
+
`/dsmm-status` reports normalized bounded state; `/dsmm-status json` returns a defensive version-1 snapshot. Status separates admitted profile/revision/epoch, actual route state, effective settings and captured module/runtime binding. Roots using `rootModelPolicy: "native"` report native-owned effort and keep the native model tab's route. Eligible `configured` roots report configuration-led routing and its bounded recovery state. `profileModel` is a declared route, not proof that selection or execution already happened.
|
|
62
64
|
|
|
63
65
|
`dsmm-status` is reserved. Setting `modeName` to that exact value normalizes the mode command to `deepwork`, preserving the independent inspection command. Status computation doesn't select a model or contact a provider.
|
|
64
66
|
|
package/docs/tui.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 在 dsh-TUI 中使用 DSMM
|
|
2
|
+
|
|
3
|
+
TUI 适配面向 `@deepseek-harness-tui/dsh-tui` **0.16.1** 的公开接口,并要求实际 DSH 运行时为 **`0.2.1-rc.2`**。需要包含此适配的 DSMM 构建;接口核对不能替代真实终端联调。
|
|
4
|
+
|
|
5
|
+
## 加载位置
|
|
6
|
+
|
|
7
|
+
使用 TUI 的 **dsh 内核**,将 DSMM 安装并启用在 TUI 实际使用的原生 profile 中,默认名为 `dsh-tui`。Desktop 是另一套部署:装在 Desktop 中的插件不会自动出现在 TUI 中,也不要复制 Desktop 的凭据或整个 profile。
|
|
8
|
+
|
|
9
|
+
DSMM 通过原生 bundle 加载核心服务,再通过 TUI 的托管接口注册命令和设置。仅把包放进依赖列表,不代表插件已经启用。Web 配置页不会转换成终端界面;TUI 不提供另一套复杂方案编辑器。
|
|
10
|
+
|
|
11
|
+
## 常用操作
|
|
12
|
+
|
|
13
|
+
| 入口 | 用途 |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `/dsmm` | 打开操作菜单 |
|
|
16
|
+
| `/dsmm status`、`/dsmm status json` | 查看当前会话状态和部署中的待生效设置,或输出结构化快照 |
|
|
17
|
+
| `/dsmm deepwork`、`/dsmm deepwork off` | 开启或关闭当前会话的 Deepwork 模式 |
|
|
18
|
+
| `/dsmm config` | 修改少量 Global 选项,包括模块开关、默认模式、语言、工作流和根模型策略 |
|
|
19
|
+
| `/dsmm profiles` | 浏览已保存方案,选择未来默认方案,或在当前符合条件的根会话中应用方案 |
|
|
20
|
+
| `/settings` 中的 DSMM 区块 | 修改当前原生 profile 的简单覆盖项 |
|
|
21
|
+
|
|
22
|
+
TUI 使用单一 `/dsmm` 入口,命令权限整体启用或撤销,不分别授权各个子命令。Desktop 的 `/dsmm-status` 和可配置名称的 `/deepwork` 命令保持原样。
|
|
23
|
+
|
|
24
|
+
管理命令会显示具体目标和值,并要求在终端确认。取消、超时,或确认期间会话、权限、插件发生变化,都不会继续使用旧确认写入。命令参数不能代替确认。一次确认不产生长期授权,也不会改变 Web 端原有的身份检查。
|
|
25
|
+
|
|
26
|
+
`/dsmm deepwork <message>` 会在开启模式后提交一条 steer 消息。如果模式已经改变而消息没有确认提交,结果会分别说明;不会自动重发消息。
|
|
27
|
+
|
|
28
|
+
## 配置写到哪里
|
|
29
|
+
|
|
30
|
+
- **`/settings` 写当前原生 profile。** 选择值后即保存,没有额外的 Save 步骤;按 Esc 不会撤销已保存的值。布尔选项包含继承、开启和关闭。选择继承只清除本层覆盖,不把默认值写回。冲突处理由原生设置服务负责。
|
|
31
|
+
- **`/dsmm config` 写 Global。** 这是同一 DSH Home 共享的配置,可能影响其他部署的后续激活。保存前会显示字段、值和范围。原生 profile 的显式覆盖仍优先于 Global。
|
|
32
|
+
- **具名方案仍用现有存储。** 在支持的配置界面准备好复杂的角色模型、备用路由和工作流设置,再在 TUI 中选择。TUI 不编辑任意 JSON、文件路径或凭据。未来默认选择按当前原生 profile 与 DSMM 条目作用域保存,不等于为所有部署设默认。
|
|
33
|
+
|
|
34
|
+
保存配置不等于修改正在运行的会话。状态会区分待生效配置和当前会话实际捕获的配置。应用方案仍要求根会话及相关子任务真正空闲,遵守原有 revision、权限和维护检查;不能用终端确认绕过活动任务保护。
|
|
35
|
+
|
|
36
|
+
## 让根会话按配置选模型
|
|
37
|
+
|
|
38
|
+
在 **TUI 的原生 profile** 中把 `rootModelPolicy` 设为 `configured`,并为有效角色配置 `primary` 和 `fallbackRoutes`。普通会话还需开启 Deepwork;配置本身不会打开已关闭的模块或赋予角色权限。
|
|
39
|
+
|
|
40
|
+
- `native` 是默认值,保留 DSH 原生模型选择。
|
|
41
|
+
- `configured` 让符合条件的根会话按已捕获配置路由,不需要在终端再调整模型。未设置 primary 时继承原生基础路由,不生成一个默认模型。
|
|
42
|
+
- 这是**部署策略**。同一部署中的 Web 会话也遵循它;独立 Desktop 部署保持默认值时不受影响。具名方案可以提供角色路由,但不能改变该策略。
|
|
43
|
+
- 备用模型不是遇到任何错误都切换。仅允许既有规则认可的模型/服务商缺失或无输出限流等情况,并受重试预算限制。取消、凭据/权限/配额错误和已经产生部分输出的请求不会借此换模型重试。
|
|
44
|
+
|
|
45
|
+
路由不会修改原生模型选择器或 `Agent.options`。DSH 在请求路由前进行的历史图片能力检查等限制仍然存在;详见[模型路由](model-routing.md)和[兼容性说明](compatibility.md)。
|
|
46
|
+
|
|
47
|
+
## 权限与验证边界
|
|
48
|
+
|
|
49
|
+
TUI 的权限策略仍由它自己的 profile 决定。0.16.1 的 Windows 默认配置使用 `danger-full-access` 和审批 `never`;有审批界面不代表会话允许弹出审批。DSMM 不会为了适配自动改变这些设置,也不把子任务的审批限制解除。
|
|
50
|
+
|
|
51
|
+
托管服务或命令权限失效后,DSMM 停止管理操作,不退回不受托管的命令入口。已生效的模型策略与管理界面分开:管理服务暂时不可用,不会自行取消仍有效的配置路由。
|
|
52
|
+
|
|
53
|
+
真实 TUI 安装、终端交互、插件准入/卸载以及原生任务控制需要单独联调。类型检查、源码测试或 mock 对话框通过,不能证明这些界面已经可用。安装和启动测试应使用隔离的 Home/profile,不操作现有会话或复制用户凭据。
|
package/dsh-plugin.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://dsh.community/schemas/dsh-plugin-0.15.json",
|
|
3
|
+
"manifestVersion": "0.15",
|
|
4
|
+
"id": "com.hugefiver.dsmm",
|
|
5
|
+
"name": "DSMM",
|
|
6
|
+
"version": "0.3.16",
|
|
7
|
+
"facets": {
|
|
8
|
+
"host": {
|
|
9
|
+
"entry": "lib/index.js",
|
|
10
|
+
"apiVersion": "v1alpha1"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"requires": {
|
|
14
|
+
"contracts": [
|
|
15
|
+
{
|
|
16
|
+
"apiVersion": "commands.dsh/v1alpha1",
|
|
17
|
+
"kind": "Command"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"permissions": [
|
|
22
|
+
{
|
|
23
|
+
"name": "commands.invoke",
|
|
24
|
+
"scope": "com.hugefiver.dsmm.manage",
|
|
25
|
+
"reason": "show DSMM status and confirm bounded Deepwork, configuration or profile actions"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"contributes": {
|
|
29
|
+
"commands": [
|
|
30
|
+
{
|
|
31
|
+
"id": "com.hugefiver.dsmm.manage",
|
|
32
|
+
"title": "Manage DSMM"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"subscriptions": [],
|
|
37
|
+
"license": "LicenseRef-AAAPL",
|
|
38
|
+
"source": {
|
|
39
|
+
"repository": "https://github.com/hugefiver/dsmm"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -218,7 +218,7 @@ export function ProfilesSection(props) {
|
|
|
218
218
|
void props.open(event.currentTarget.value); }, children: [_jsx("option", { value: "", children: t(editor?.revision === null ? "newDraft" : "choose") }), snapshot.profiles.map((profile, index) => _jsxs("option", { value: profile.id, children: [profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id, profile.error === undefined ? "" : ` — ${t("invalidProfile", { id: profile.id })}`, profile.warnings?.length ? ` — ${t("warningProfile")}` : ""] }, `${index}:${profile.id}`))] })] }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: editorDisabled || snapshot === null, onClick: (event) => { initiatorRef.current = event.currentTarget; void props.create(); }, children: t("new") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled, onClick: (event) => { initiatorRef.current = event.currentTarget; void props.refresh(); }, children: t(state.busy === "refresh" ? "refreshing" : "refresh") })] }), editor !== null && _jsx("p", { className: "dsmm-badge", "data-dsmm-editor-state": state.invalidFields.length > 0 || invalid || rawInvalid ? "invalid" : state.dirty ? "dirty" : readOnly ? "readonly" : "ready", children: t(editor.refreshRequired ? "savedRefreshRequired" : state.invalidFields.length > 0 || invalid || rawInvalid ? "validation" : state.dirty ? "dirty" : applied ? "savedApplied" : relationship === "unknown" ? "savedRelationshipUnknown" : "savedNotApplied") })] }), snapshot?.profiles.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("empty") }), snapshot !== null && snapshot.profiles.some(profile => profile.error !== undefined || profile.warnings?.length) && _jsx("ul", { className: "dsmm-profile-list", "aria-label": t("savedInventory"), children: snapshot.profiles.filter(profile => profile.error !== undefined || profile.warnings?.length).map((profile, index) => _jsxs("li", { children: [_jsx("p", { children: profile.label?.trim() ? `${profile.label} (${profile.id})` : profile.id }), _jsx(ProfileWarnings, { warnings: profile.warnings, t: t }), profile.error !== undefined && _jsx(IssueDetails, { issue: profile.error, t: t })] }, `${index}:${profile.id}`)) }), state.pendingEditor !== null && _jsxs("div", { className: "dsmm-confirm", role: "group", "aria-labelledby": `${prefix}-confirm`, onKeyDown: (event) => { if (event.key === "Escape") {
|
|
219
219
|
event.preventDefault();
|
|
220
220
|
props.cancelDiscard();
|
|
221
|
-
} }, children: [_jsx("p", { id: `${prefix}-confirm`, children: t("discardPrompt") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => { void props.discardAndOpen(); }, children: t("discard") }), _jsx(Button, { ref: cancelRef, type: "button", variant: "primary", onClick: props.cancelDiscard, children: t("cancel") })] })] }), _jsxs("div", { className: "dsmm-effective-summary", "data-dsmm-effective-summary": true, children: [_jsxs("div", { className: "dsmm-summary-row", children: [_jsxs("div", { children: [_jsx("span", { className: "dsmm-summary-label", children: t("futureDefaultSummary") }), " ", _jsx("span", { className: "dsmm-summary-val", "data-dsmm-selection": true, children: selection })] }), _jsx(Button, { type: "button", variant: "primary", size: "sm", disabled: editorDisabled || state.dirty || state.invalidFields.length > 0 || editor?.revision == null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") })] }), snapshot?.refreshRequired && _jsx("p", { role: "status", children: t("savedRefreshRequired") }), snapshot?.selectedWarnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("futureWarnings") }), _jsx(ProfileWarnings, { warnings: snapshot.selectedWarnings, t: t })] }) : null, snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") }), _jsx(IssueDetails, { issue: snapshot.selectionError, t: t })] }), _jsxs("div", { className: "dsmm-summary-row", children: [_jsxs("div", { children: [_jsx("span", { className: "dsmm-summary-label", children: t("currentSessionSummary") }), " ", _jsx("span", { className: "dsmm-summary-val", children: state.session === null ? t("sessionUnavailable") : sessionProfileLabels(state.session, t).admitted })] }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => {
|
|
221
|
+
} }, children: [_jsx("p", { id: `${prefix}-confirm`, children: t("discardPrompt") }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", onClick: () => { void props.discardAndOpen(); }, children: t("discard") }), _jsx(Button, { ref: cancelRef, type: "button", variant: "primary", onClick: props.cancelDiscard, children: t("cancel") })] })] }), _jsxs("div", { className: "dsmm-effective-summary", "data-dsmm-effective-summary": true, children: [_jsxs("div", { className: "dsmm-summary-row", children: [_jsxs("div", { children: [_jsx("span", { className: "dsmm-summary-label", children: t("futureDefaultSummary") }), " ", _jsx("span", { className: "dsmm-summary-val", "data-dsmm-selection": true, children: selection })] }), _jsx(Button, { type: "button", variant: "primary", size: "sm", disabled: editorDisabled || state.dirty || state.invalidFields.length > 0 || editor?.revision == null || !reconcilable || (applied && !selectionConflict), onClick: () => { void props.apply(); }, children: t(state.busy === "apply" ? "applying" : "apply") })] }), snapshot?.refreshRequired && _jsx("p", { role: "status", children: t("savedRefreshRequired") }), snapshot?.selectedWarnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("futureWarnings") }), _jsx(ProfileWarnings, { warnings: snapshot.selectedWarnings, t: t })] }) : null, snapshot?.selectionError !== undefined && _jsxs("div", { className: "dsmm-issue", children: [_jsx("p", { children: t(selectionConflict ? "selectionConflict" : "retry") }), _jsx(IssueDetails, { issue: snapshot.selectionError, t: t })] }), _jsxs("div", { className: "dsmm-summary-row", children: [_jsxs("div", { children: [_jsx("span", { className: "dsmm-summary-label", children: t("currentSessionSummary") }), " ", _jsx("span", { className: "dsmm-summary-val", children: state.session === null ? t(state.sessionReadinessPending ? "sessionWaitingReady" : "sessionUnavailable") : sessionProfileLabels(state.session, t).admitted })] }), _jsx(Button, { type: "button", variant: "outline", size: "sm", onClick: () => {
|
|
222
222
|
if (moreActionsRef.current !== null) {
|
|
223
223
|
moreActionsRef.current.open = true;
|
|
224
224
|
moreActionsOpenRef.current = true;
|
|
@@ -31,7 +31,7 @@ function menuIssue(issue) {
|
|
|
31
31
|
export function SessionScopeFeedback({ state, t }) {
|
|
32
32
|
const session = state.session;
|
|
33
33
|
const status = state.sessionNotice === null ? "" : t(state.sessionNotice === "mode-on" ? "headerModeOn" : state.sessionNotice === "mode-off" ? "headerModeOff" : state.sessionNotice === "applied-with-model" ? "sessionAppliedWithModel" : state.sessionNotice === "applied" ? "sessionApplied" : "sessionResetDone");
|
|
34
|
-
return _jsxs("div", { "data-dsmm-session-feedback": true, children: [session?.warnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("admissionWarnings") }), _jsx(ProfileWarnings, { warnings: session.warnings, t: t })] }) : null, state.dirty && _jsx("p", { className: "dsmm-hint", children: t("sessionDirty") }), (session?.refreshRequired || session?.selection.refreshRequired) && _jsx("p", { role: "status", children: t("sessionCommittedRefresh") }), state.sessionUnconfirmed && _jsx("p", { role: "status", children: t(state.sessionIssue?.code === "blank-identity-unconfirmed" ? "sessionPreparationUnknown" : "sessionUnconfirmedRefresh") }), state.sessionIssue !== null && _jsxs(_Fragment, { children: [_jsx("p", { role: "alert", children: state.sessionIssue.source === "profile-model" ? t(state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed")
|
|
34
|
+
return _jsxs("div", { "data-dsmm-session-feedback": true, children: [session?.warnings?.length ? _jsxs("div", { children: [_jsx("p", { children: t("admissionWarnings") }), _jsx(ProfileWarnings, { warnings: session.warnings, t: t })] }) : null, state.dirty && _jsx("p", { className: "dsmm-hint", children: t("sessionDirty") }), (session?.refreshRequired || session?.selection.refreshRequired) && _jsx("p", { role: "status", children: t("sessionCommittedRefresh") }), state.sessionUnconfirmed && _jsx("p", { role: "status", children: t(state.sessionIssue?.code === "blank-identity-unconfirmed" ? "sessionPreparationUnknown" : "sessionUnconfirmedRefresh") }), state.sessionReadinessPending && _jsx("p", { role: "status", children: t("sessionWaitingReady") }), state.sessionIssue !== null && !state.sessionReadinessPending && _jsxs(_Fragment, { children: [_jsx("p", { role: "alert", children: state.sessionIssue.source === "profile-model" ? t(state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed")
|
|
35
35
|
: state.sessionIssue.code === "conflict" ? t("sessionConflict")
|
|
36
36
|
: ["busy", "maintenance", "disposed", "not-owned"].includes(state.sessionIssue.code) ? t("sessionBusy", { reason: state.sessionIssue.code })
|
|
37
37
|
: t(state.sessionIssue.code === "validation" ? "validation" : "sessionUnavailable") }), _jsx(IssueDetails, { issue: state.sessionIssue, t: t })] }), _jsx("p", { className: "dsmm-status", role: "status", "aria-live": "polite", "aria-atomic": "true", children: state.sessionBusy === "read" ? t("reading") : status })] });
|
|
@@ -58,7 +58,7 @@ export function SessionScope({ state, actions, t, compact = false, showFeedback
|
|
|
58
58
|
void actions.chooseSessionWorkspace(event.currentTarget.value); }, children: [_jsx("option", { value: "", children: t("sessionWorkspacePlaceholder") }), state.sessionWorkspaces.map(workspace => _jsx("option", { value: workspace.id, children: workspace.label }, workspace.id))] })] }), state.sessionWorkspaces.length === 0 && _jsx("p", { className: "dsmm-hint", children: t("sessionNoWorkspaces") }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-choice`, children: t("sessionSelect") }), _jsxs("select", { id: `${prefix}-choice`, value: state.sessionChoice ?? "", disabled: !state.sessionPreparationAvailable || disabled || state.sessionUnconfirmed, onChange: event => { if (current())
|
|
59
59
|
actions.chooseSessionProfile(event.currentTarget.value || null); }, children: [_jsx("option", { value: "", children: t("sessionBaseline") }), state.snapshot?.profiles.map(profile => _jsx("option", { value: profile.id, disabled: !isConfigRevision(profile.revision) || profile.error !== undefined, children: profile.label?.trim() || profile.id }, profile.id))] })] }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: !state.sessionPreparationAvailable || disabled || state.sessionUnconfirmed || state.snapshot === null, onClick: () => { if (current())
|
|
60
60
|
void actions.applySession(); }, children: t("sessionPrepare") }), _jsx(Button, { type: "button", variant: "outline", disabled: state.sessionBusy !== null || state.busy !== null || state.pendingEditor !== null, onClick: () => { if (current())
|
|
61
|
-
void actions.refreshSession(); }, children: t("sessionRefresh") })] })] }) : _jsxs(_Fragment, { children: [labels !== null && _jsx("p", { "data-dsmm-session-state": true, children: labels.admitted }), labels !== null && !compact && _jsx("p", { className: "dsmm-hint", "data-dsmm-session-future-default": true, children: labels.futureDefault }), session === null && _jsx("p", { className: "dsmm-hint", id: `${prefix}-overlay-reason`, children: t("sessionUnavailable") }), session !== null && !allowed && _jsx("p", { className: "dsmm-hint", id: `${prefix}-overlay-reason`, children: capabilityReason(session.applyOverlayUnavailableReason, t) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-choice`, children: t("sessionSelect") }), _jsxs("select", { id: `${prefix}-choice`, value: state.sessionChoice ?? "", disabled: disabled || !allowed, "aria-describedby": !allowed ? `${prefix}-overlay-reason` : undefined, onChange: (event) => { if (current())
|
|
61
|
+
void actions.refreshSession(); }, children: t("sessionRefresh") })] })] }) : _jsxs(_Fragment, { children: [labels !== null && _jsx("p", { "data-dsmm-session-state": true, children: labels.admitted }), labels !== null && !compact && _jsx("p", { className: "dsmm-hint", "data-dsmm-session-future-default": true, children: labels.futureDefault }), session === null && _jsx("p", { className: "dsmm-hint", id: `${prefix}-overlay-reason`, children: t(state.sessionReadinessPending ? "sessionWaitingReady" : "sessionUnavailable") }), session !== null && !allowed && _jsx("p", { className: "dsmm-hint", id: `${prefix}-overlay-reason`, children: capabilityReason(session.applyOverlayUnavailableReason, t) }), _jsxs("div", { className: "dsmm-field", children: [_jsx("label", { htmlFor: `${prefix}-choice`, children: t("sessionSelect") }), _jsxs("select", { id: `${prefix}-choice`, value: state.sessionChoice ?? "", disabled: disabled || !allowed, "aria-describedby": !allowed ? `${prefix}-overlay-reason` : undefined, onChange: (event) => { if (current())
|
|
62
62
|
actions.chooseSessionProfile(event.currentTarget.value || null); }, children: [_jsx("option", { value: "", children: t("sessionBaseline") }), state.sessionChoice !== null && selected === undefined && _jsx("option", { value: state.sessionChoice, children: state.sessionChoice }), state.snapshot?.profiles.map((profile) => _jsxs("option", { value: profile.id, disabled: !isConfigRevision(profile.revision) || profile.error !== undefined, children: [profile.label?.trim() || profile.id, profileWarnings(profile.warnings).length ? ` — ${t("warningProfile")}` : ""] }, profile.id))] })] }), !compact && _jsxs(_Fragment, { children: [_jsx("p", { className: "dsmm-hint", id: `${prefix}-model-hint`, children: t("useSessionProfileModelDesc") }), _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !modelAllowed, "aria-describedby": `${prefix}-model-hint${!modelAllowed ? ` ${prefix}-model-reason` : ""}`, onClick: () => { if (current())
|
|
63
63
|
void actions.useSessionProfileModel(); }, children: t("headerUseCurrentModel") }), !modelAllowed && _jsx("p", { className: "dsmm-hint", id: `${prefix}-model-reason`, children: capabilityReason(session?.selectModelUnavailableReason, t) }), session !== null && _jsxs("details", { children: [_jsx("summary", { children: t("technicalDetails") }), _jsxs("div", { className: "dsmm-availability", children: [_jsx("p", { children: binding === undefined ? t("bindingUnknown") : t("bindingState", { binding: binding.binding, ready: t(binding.deliveryFenceReady ? "enabled" : "disabled"), restart: t(binding.restartRequired ? "enabled" : "disabled") }) }), binding?.reason !== undefined && _jsx("p", { children: t("bindingReason", { reason: binding.reason }) })] }), session.roles !== undefined && _jsxs("details", { children: [_jsx("summary", { children: t("admittedRoles") }), session.roles.map(role => _jsxs("div", { className: "dsmm-availability", children: [_jsx("p", { children: role.id }), _jsx(RoleAvailability, { value: role, t: t })] }, role.id))] }), session.rolePolicy !== undefined && _jsx("p", { "data-dsmm-session-policy": true, children: t("roleState", { route: session.rolePolicy.route === undefined ? t("inheritRoute") : `${session.rolePolicy.route.provider}/${session.rolePolicy.route.model}${session.rolePolicy.route.reasoningEffort === undefined ? "" : ` (${session.rolePolicy.route.reasoningEffort})`}`, strategy: session.rolePolicy.strategy, retries: session.rolePolicy.retries, failures: session.rolePolicy.rateLimitFailures, switches: session.rolePolicy.switches, delay: session.rolePolicy.totalDelayMs }) })] })] }), _jsxs("div", { className: "dsmm-actions", children: [_jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed || (state.sessionChoice !== null && !isConfigRevision(selected?.revision)), "aria-describedby": !allowed ? `${prefix}-overlay-reason` : undefined, onClick: () => { if (current())
|
|
64
64
|
void actions.applySession(); }, children: t(state.sessionBusy === "apply" ? "sessionApplying" : "sessionApply") }), !compact && _jsx(Button, { type: "button", variant: "outline", disabled: disabled || !allowed, "aria-describedby": !allowed ? `${prefix}-overlay-reason` : undefined, onClick: () => { if (current())
|
|
@@ -92,6 +92,8 @@ export function SessionProfiles(props) {
|
|
|
92
92
|
feedback = t(state.sessionIssue?.code === "blank-identity-unconfirmed" ? "sessionPreparationUnknown" : "sessionUnconfirmedRefresh");
|
|
93
93
|
else if (session?.refreshRequired || session?.selection.refreshRequired)
|
|
94
94
|
feedback = t("sessionCommittedRefresh");
|
|
95
|
+
else if (state.sessionReadinessPending)
|
|
96
|
+
feedback = t("sessionWaitingReady");
|
|
95
97
|
else if (state.sessionIssue !== null)
|
|
96
98
|
feedback = t(state.sessionIssue.source === "profile-model" ? state.sessionIssue.code === "model-unconfigured" ? "headerNoProfileModel" : state.sessionIssue.code === "model-choice-changed" ? "headerModelChoiceChanged" : "headerModelUnconfirmed"
|
|
97
99
|
: state.sessionIssue.code === "conflict" ? "headerConflict" : state.sessionIssue.code === "activation" ? "headerActivationRefused"
|
|
@@ -108,7 +110,7 @@ export function SessionProfiles(props) {
|
|
|
108
110
|
else if (state.sessionNotice !== null)
|
|
109
111
|
feedback = t(state.sessionNotice === "mode-on" ? "headerModeOn" : state.sessionNotice === "mode-off" ? "headerModeOff" : state.sessionNotice === "applied-with-model" ? "headerAppliedWithModel" : "headerApplied");
|
|
110
112
|
const profileName = unknownCaptured ? t("headerCaptured") : admission !== undefined && sourceRelationship(admission, currentSaved?.revision) === "current" && currentSaved?.label?.trim() ? currentSaved.label : admission?.selectedId ?? t("sessionBaseline");
|
|
111
|
-
const currentLabel = t("headerCurrentProfile", { profile: session === null ? t("headerUnavailable") : profileName });
|
|
113
|
+
const currentLabel = t("headerCurrentProfile", { profile: session === null ? t(state.sessionReadinessPending ? "sessionWaitingReady" : "headerUnavailable") : profileName });
|
|
112
114
|
const entries = [{ type: "label", id: "@current", text: currentLabel }];
|
|
113
115
|
for (const warning of profileWarnings(session?.warnings))
|
|
114
116
|
entries.push({ type: "label", id: `@warning:${warning.code}`, text: t("warningMarker", { code: warning.code, field: warning.field }) });
|
|
@@ -121,7 +123,7 @@ export function SessionProfiles(props) {
|
|
|
121
123
|
disabled: unavailable || session?.canToggleMode !== true || mode === undefined || mode.locked });
|
|
122
124
|
if (session !== null && session.canToggleMode !== true)
|
|
123
125
|
entries.push({ type: "label", id: "@mode-reason", text: capabilityReason(session.toggleModeUnavailableReason, t) });
|
|
124
|
-
const diagnostic = state.sessionIssue === null ? null : menuIssue(state.sessionIssue);
|
|
126
|
+
const diagnostic = state.sessionIssue === null || state.sessionReadinessPending ? null : menuIssue(state.sessionIssue);
|
|
125
127
|
const diagnosticText = diagnostic === null ? "" : t("headerIssueCode", { code: diagnostic.code }) + (diagnostic.field === undefined ? "" : ` ${t("headerIssueField", { field: diagnostic.field })}`);
|
|
126
128
|
const retryHint = t(state.sessionUnconfirmed ? "sessionUnconfirmedRefresh" : diagnostic?.code === "maintenance" || diagnostic?.code === "busy" ? "headerWaitRetryHint" : "headerRetryHint");
|
|
127
129
|
if (diagnostic !== null)
|
|
@@ -153,8 +155,7 @@ export function SessionProfiles(props) {
|
|
|
153
155
|
if (value === "@refresh") {
|
|
154
156
|
if (committing || state.busy !== null)
|
|
155
157
|
return;
|
|
156
|
-
void
|
|
157
|
-
await props.refreshSession(); })();
|
|
158
|
+
void props.refresh();
|
|
158
159
|
}
|
|
159
160
|
else {
|
|
160
161
|
const row = entries.find((entry) => entry.id === value && !("type" in entry));
|
|
@@ -178,6 +179,6 @@ export function SessionProfiles(props) {
|
|
|
178
179
|
}
|
|
179
180
|
}
|
|
180
181
|
setOpenFor(undefined);
|
|
181
|
-
} }), _jsxs("span", { className: "dsmm-profile-announcement", id: `${prefix}-feedback`, role: state.sessionIssue === null ? "status" : "alert", "aria-live": "polite", "aria-atomic": "true", children: [feedback || currentLabel, diagnostic === null ? "" : ` ${diagnosticText} ${retryHint}`] })] });
|
|
182
|
+
} }), _jsxs("span", { className: "dsmm-profile-announcement", id: `${prefix}-feedback`, role: state.sessionIssue === null || state.sessionReadinessPending ? "status" : "alert", "aria-live": "polite", "aria-atomic": "true", children: [feedback || currentLabel, diagnostic === null ? "" : ` ${diagnosticText} ${retryHint}`] })] });
|
|
182
183
|
}
|
|
183
184
|
//# sourceMappingURL=SessionProfiles.js.map
|
|
@@ -263,6 +263,7 @@ export declare const childrenLocaleZh: {
|
|
|
263
263
|
activity: string;
|
|
264
264
|
refresh: string;
|
|
265
265
|
images: string;
|
|
266
|
+
restart: string;
|
|
266
267
|
title: string;
|
|
267
268
|
liveRoute: string;
|
|
268
269
|
descendants: string;
|
|
@@ -319,7 +320,6 @@ export declare const childrenLocaleZh: {
|
|
|
319
320
|
interruptAvailability: string;
|
|
320
321
|
imageAvailability: string;
|
|
321
322
|
fence: string;
|
|
322
|
-
restart: string;
|
|
323
323
|
authority: string;
|
|
324
324
|
evidence: string;
|
|
325
325
|
evidenceMissing: string;
|
|
@@ -47,6 +47,7 @@ export interface ProfilesViewSnapshot {
|
|
|
47
47
|
currentSessionId: string | null;
|
|
48
48
|
sessionViewEpoch: number;
|
|
49
49
|
sessionUnconfirmed: boolean;
|
|
50
|
+
sessionReadinessPending: boolean;
|
|
50
51
|
session: SessionProfileSnapshot | null;
|
|
51
52
|
sessionChoice: string | null;
|
|
52
53
|
sessionWorkspaces: readonly ProfileWorkspace[];
|
|
@@ -140,6 +141,13 @@ export declare class ProfilesController {
|
|
|
140
141
|
private modeRefreshPending;
|
|
141
142
|
private sessionSource;
|
|
142
143
|
private sessionSourceId;
|
|
144
|
+
private sessionBinding;
|
|
145
|
+
private agentAvailable;
|
|
146
|
+
private availabilityEpoch;
|
|
147
|
+
private availabilityReadSucceeded;
|
|
148
|
+
private initialSessionRead;
|
|
149
|
+
private sessionReadIssue;
|
|
150
|
+
private readinessTimer;
|
|
143
151
|
private stopSessionSource;
|
|
144
152
|
private stopModelEvents;
|
|
145
153
|
private modelInteraction;
|
|
@@ -170,7 +178,11 @@ export declare class ProfilesController {
|
|
|
170
178
|
private syncComposerBlock;
|
|
171
179
|
attachModelSelector(remote: ProfileModelSelectorRemote | null): void;
|
|
172
180
|
attachModelSelectionSource(sessionId: string | null, source: HostObservable<unknown> | null): void;
|
|
173
|
-
attachSessionSource(sessionId: string | null, source: HostObservable<SessionSnapshot> | null): void;
|
|
181
|
+
attachSessionSource(sessionId: string | null, source: HostObservable<SessionSnapshot> | null, binding?: object | null): void;
|
|
182
|
+
private endReadiness;
|
|
183
|
+
private resetReadiness;
|
|
184
|
+
private sessionSourceFailed;
|
|
185
|
+
observeSessionAvailability(id: string, source: HostObservable<SessionSnapshot>, available: boolean): void;
|
|
174
186
|
attachModelEventSource(sessionId: string | null, source: SessionEventSource | null): void;
|
|
175
187
|
attachModelInteractionSource(sessionId: string | null, source: ModelInteractionSource | null): void;
|
|
176
188
|
attachCatalog(remote: ModelCatalogRemote | null): void;
|