@dsmm/dsmm 0.3.21 → 0.3.23

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 (95) hide show
  1. package/README.md +4 -4
  2. package/agent-presets/dsmm-builder/agent.cordis.yml +1 -7
  3. package/agent-presets/dsmm-clarifier/agent.cordis.yml +1 -7
  4. package/agent-presets/dsmm-code-search/agent.cordis.yml +1 -7
  5. package/agent-presets/dsmm-coding/agent.cordis.yml +1 -7
  6. package/agent-presets/dsmm-complex/agent.cordis.yml +1 -7
  7. package/agent-presets/dsmm-creative/agent.cordis.yml +1 -7
  8. package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +1 -7
  9. package/agent-presets/dsmm-deep/agent.cordis.yml +1 -7
  10. package/agent-presets/dsmm-doc-search/agent.cordis.yml +1 -7
  11. package/agent-presets/dsmm-documenting/agent.cordis.yml +1 -7
  12. package/agent-presets/dsmm-frontend/agent.cordis.yml +1 -7
  13. package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +1 -7
  14. package/agent-presets/dsmm-media-reader/agent.cordis.yml +1 -7
  15. package/agent-presets/dsmm-normal-task/agent.cordis.yml +1 -7
  16. package/agent-presets/dsmm-oracle/agent.cordis.yml +1 -7
  17. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +1 -7
  18. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +1 -7
  19. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +1 -7
  20. package/agent-presets/dsmm-planner/agent.cordis.yml +1 -7
  21. package/agent-presets/dsmm-quick/agent.cordis.yml +1 -7
  22. package/agent-presets/dsmm-research/agent.cordis.yml +1 -7
  23. package/agent-presets/dsmm-reviewer/agent.cordis.yml +1 -7
  24. package/cordis.patch.yml +3 -0
  25. package/docs/compatibility.md +13 -1
  26. package/docs/maintenance.md +26 -7
  27. package/docs/model-routing.md +25 -3
  28. package/docs/native-permissions.md +20 -4
  29. package/docs/releasing.md +3 -3
  30. package/docs/roadmap.md +40 -8
  31. package/docs/runtime-recovery.md +5 -3
  32. package/docs/testing.md +10 -0
  33. package/docs/web-fetch-fakeip.md +8 -2
  34. package/dsh-plugin.json +1 -1
  35. package/lib/agent-prompt-scope.d.ts +6 -0
  36. package/lib/agent-prompt-scope.js +66 -0
  37. package/lib/client/RoleToolView-data.d.ts +4 -2
  38. package/lib/client/RoleToolView-data.js +18 -4
  39. package/lib/client/RoleToolView-locales.d.ts +4 -0
  40. package/lib/client/RoleToolView-locales.js +2 -0
  41. package/lib/client/RoleToolView.d.ts +9 -3
  42. package/lib/client/RoleToolView.js +27 -8
  43. package/lib/client/children-locales.d.ts +4 -4
  44. package/lib/client/index.js +6 -1
  45. package/lib/client/role-call-observations.d.ts +21 -0
  46. package/lib/client/role-call-observations.js +150 -0
  47. package/lib/client.js +401 -96
  48. package/lib/dsh-types.d.ts +15 -0
  49. package/lib/index.js +4 -1
  50. package/lib/live-pi-ai-owner.d.ts +1 -2
  51. package/lib/live-pi-ai-owner.js +10 -7
  52. package/lib/locale-guidance.d.ts +3 -0
  53. package/lib/locale-guidance.js +12 -0
  54. package/lib/model-family.d.ts +14 -0
  55. package/lib/model-family.js +138 -35
  56. package/lib/model-routing.d.ts +23 -2
  57. package/lib/model-routing.js +145 -7
  58. package/lib/native-admission.d.ts +36 -1
  59. package/lib/native-admission.js +408 -24
  60. package/lib/native-pi-ai-wire.js +17 -4
  61. package/lib/profile-remote.d.ts +2 -0
  62. package/lib/profile-remote.js +12 -3
  63. package/lib/profile-types.d.ts +5 -0
  64. package/lib/prompts.d.ts +3 -2
  65. package/lib/prompts.js +20 -38
  66. package/lib/role-control-remote.d.ts +5 -2
  67. package/lib/role-control-remote.js +84 -4
  68. package/lib/role-control-rpc.d.ts +8 -1
  69. package/lib/role-control-rpc.js +122 -50
  70. package/lib/role-control-types.d.ts +62 -1
  71. package/lib/role-control-types.js +3 -0
  72. package/lib/role-invocation.js +1 -1
  73. package/lib/role-llm-runtime.js +2 -2
  74. package/lib/role-routing.d.ts +27 -7
  75. package/lib/role-routing.js +129 -16
  76. package/lib/role-subagents.js +8 -23
  77. package/lib/runtime-recovery.js +23 -6
  78. package/lib/session-metadata.d.ts +13 -1
  79. package/lib/session-metadata.js +21 -1
  80. package/lib/web-fetch-address-policy.d.ts +6 -2
  81. package/lib/web-fetch-fakeip.d.ts +6 -0
  82. package/lib/web-fetch-fakeip.js +29 -2
  83. package/package.json +2 -2
  84. package/prompts/deepwork.md +0 -1
  85. package/prompts/source/deepwork/claude-opus-5.md +2 -8
  86. package/prompts/source/deepwork/codex.md +2 -8
  87. package/prompts/source/deepwork/gemini-4.md +1 -7
  88. package/prompts/source/deepwork/gemini.md +0 -6
  89. package/prompts/source/deepwork/glm.md +3 -10
  90. package/prompts/source/deepwork/gpt.md +16 -15
  91. package/prompts/source/deepwork/kimi.md +1 -7
  92. package/prompts/source/deepwork/planner.md +0 -4
  93. package/prompts/source/deepwork/swe-2.md +2 -8
  94. package/prompts/source/shared/dsh-host-contract.md +0 -1
  95. package/prompts/source/shared/locale.md +1 -6
@@ -3,12 +3,7 @@
3
3
  config:
4
4
  prefix: |-
5
5
  <dsmm-locale-guidance>
6
- Language and locale:
7
- - This shared resource supplies no configured locale; preserve this exact Agent's captured locale and applicable host/user language guidance when supplied.
8
- - When neither captured locale nor applicable host/user language guidance is supplied, infer the preferred visible-output language from the current request and conversation context. This does not configure reasoning language or the host/project locale.
9
- - If the user mixes languages, use the language that best matches the current request.
10
- - Preserve code, identifiers, file paths, commands, protocol names, quotes, and user-requested wording in their original language when accuracy requires it.
11
- - If the user explicitly asks for a different output language for a specific answer, follow that local request unless it conflicts with higher-priority instructions.
6
+ Follow the current user's explicit output-language request, then this Agent's captured locale when supplied, then applicable host guidance or the current request and conversation context. Preserve code, identifiers, paths, commands and quotations when accuracy requires it. This governs visible output only.
12
7
  </dsmm-locale-guidance>
13
8
 
14
9
  ---
@@ -42,7 +37,6 @@
42
37
  Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
43
38
  One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
44
39
  The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
45
- Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
46
40
  Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
47
41
  </dsmm-host-contract>
48
42
 
@@ -3,12 +3,7 @@
3
3
  config:
4
4
  prefix: |-
5
5
  <dsmm-locale-guidance>
6
- Language and locale:
7
- - This shared resource supplies no configured locale; preserve this exact Agent's captured locale and applicable host/user language guidance when supplied.
8
- - When neither captured locale nor applicable host/user language guidance is supplied, infer the preferred visible-output language from the current request and conversation context. This does not configure reasoning language or the host/project locale.
9
- - If the user mixes languages, use the language that best matches the current request.
10
- - Preserve code, identifiers, file paths, commands, protocol names, quotes, and user-requested wording in their original language when accuracy requires it.
11
- - If the user explicitly asks for a different output language for a specific answer, follow that local request unless it conflicts with higher-priority instructions.
6
+ Follow the current user's explicit output-language request, then this Agent's captured locale when supplied, then applicable host guidance or the current request and conversation context. Preserve code, identifiers, paths, commands and quotations when accuracy requires it. This governs visible output only.
12
7
  </dsmm-locale-guidance>
13
8
 
14
9
  ---
@@ -56,7 +51,6 @@
56
51
  Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
57
52
  One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
58
53
  The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
59
- Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
60
54
  Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
61
55
  </dsmm-host-contract>
62
56
 
@@ -3,12 +3,7 @@
3
3
  config:
4
4
  prefix: |-
5
5
  <dsmm-locale-guidance>
6
- Language and locale:
7
- - This shared resource supplies no configured locale; preserve this exact Agent's captured locale and applicable host/user language guidance when supplied.
8
- - When neither captured locale nor applicable host/user language guidance is supplied, infer the preferred visible-output language from the current request and conversation context. This does not configure reasoning language or the host/project locale.
9
- - If the user mixes languages, use the language that best matches the current request.
10
- - Preserve code, identifiers, file paths, commands, protocol names, quotes, and user-requested wording in their original language when accuracy requires it.
11
- - If the user explicitly asks for a different output language for a specific answer, follow that local request unless it conflicts with higher-priority instructions.
6
+ Follow the current user's explicit output-language request, then this Agent's captured locale when supplied, then applicable host guidance or the current request and conversation context. Preserve code, identifiers, paths, commands and quotations when accuracy requires it. This governs visible output only.
12
7
  </dsmm-locale-guidance>
13
8
 
14
9
  ---
@@ -77,7 +72,6 @@
77
72
  Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
78
73
  One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
79
74
  The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
80
- Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
81
75
  Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
82
76
  </dsmm-host-contract>
83
77
 
@@ -3,12 +3,7 @@
3
3
  config:
4
4
  prefix: |-
5
5
  <dsmm-locale-guidance>
6
- Language and locale:
7
- - This shared resource supplies no configured locale; preserve this exact Agent's captured locale and applicable host/user language guidance when supplied.
8
- - When neither captured locale nor applicable host/user language guidance is supplied, infer the preferred visible-output language from the current request and conversation context. This does not configure reasoning language or the host/project locale.
9
- - If the user mixes languages, use the language that best matches the current request.
10
- - Preserve code, identifiers, file paths, commands, protocol names, quotes, and user-requested wording in their original language when accuracy requires it.
11
- - If the user explicitly asks for a different output language for a specific answer, follow that local request unless it conflicts with higher-priority instructions.
6
+ Follow the current user's explicit output-language request, then this Agent's captured locale when supplied, then applicable host guidance or the current request and conversation context. Preserve code, identifiers, paths, commands and quotations when accuracy requires it. This governs visible output only.
12
7
  </dsmm-locale-guidance>
13
8
 
14
9
  ---
@@ -44,7 +39,6 @@
44
39
  Logical source role names map to IDs dsmm-<name> (explore is only the code-search alias). Inspect this Agent's actual admitted tool inventory: per-role exposes individual role tools plus dsmm_category; parameterized exposes dsmm_role/dsmm_category and their permitted target enums. description/prompt are assignment inputs; optional level, route and run_in_background depend on the actual schema and captured admission. Omitted/normal retains the default route; low/high/max requires that target's configured complete route or effort-only override, with exact native preflight. route additionally needs deployment allowRouteOverride=true; no suffix role/tool or arbitrary effort is inferred. Layout/level never changes target/read-only/depth/ownership authority. A read-only planner returns complete Markdown for authorized coordinator persistence, never through file/shell writes or a child proxy.
45
40
  One-shot defaults foreground and is never revived after settlement. When enabled and admitted, native jobs own one-shot background; a managed continuable configuration defaults background and returns a durable child ID, while explicit run_in_background:false starts a non-reusable one-shot. Existing continuable children use actual exposed send_message for running/idle/same-ID cold delivery and actual native user queue/steer; acceptance is not completion. Original child route/locale/authority remains captured and intersects current exact-parent authority, not parent-new-policy inheritance. Legacy conservative evidence permits useful proven capabilities and denies missing-evidence capabilities with reasons. A foreground handoff, only through an actually wired user control, moves the existing run to native-job ownership without another start; no static text declares a new tool or RPC. Managed delivery requires disabling the stock subagents row and binding the unique PUBLIC DSMM SubagentRuntime subclass at explicit startup, then restart. Stock cannot be hot-replaced. Background/capacity/depth/ownership/cancellation remain mandatory. Native continuation is not task_id/resume/retry.
46
41
  The native main model picker, explicit user route and catalog are authoritative. Model guidance calibrates behavior only; it does not select a provider/model, grant permissions, declare external independence or change advertised effort. Oracle independence requires a different model was explicitly selected and verified in the actual route. Default inventory has no synthetic tiers or additional Oracle slots.
47
- Follow the current user's explicit visible-output language request, then this Agent's immutable captured locale when supplied, then applicable host/user language guidance or current request/context. All DSMM roles/categories follow this priority even with common mode off. Preserve identifiers, code, paths, commands, protocol fields and exact quotes; child assignments retain explicit language requests. This contract copies no Root locale/configuration, promises no internal reasoning language and changes neither host UI nor project locale.
48
42
  Role persona and access remain when Deepwork is explicitly off; common workflow and DSMM skills do not. Git/install/login/destructive actions need exact authorization regardless of mode. All delegation guidance is intersected with enabled roles, mounted capabilities, inherited permissions and native depth; runtime policy enforces those ceilings, not these static texts.
49
43
  </dsmm-host-contract>
50
44
 
package/cordis.patch.yml CHANGED
@@ -3,3 +3,6 @@
3
3
  name: '@dsmm/dsmm'
4
4
  inject: [profileContext, agents]
5
5
  config: {}
6
+ - id: fs-observation-policy
7
+ name: '@deepseek-ai/dsh-fs-observation-policy'
8
+ disabled: false
@@ -1,6 +1,6 @@
1
1
  # DSMM compatibility and upgrade boundaries
2
2
 
3
- **DSMM 0.3.17 supports DSH `>=0.2.1-rc.2 <0.3.0`** and Node.js 22 or later. Official DSH rc.3 gives `engines.dsh` precedence over peer ranges. DSH dependencies, peerDependencies and devDependencies remain pinned to rc.2 as the development baseline; versions outside the declared Host range aren't supported.
3
+ **DSMM 0.3.22 supports DSH `>=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0`** and Node.js 22 or later. The dual branch admits the 0.2.2 RC series (from `0.2.2-rc.1` on) while keeping every supported 0.2.1 release in range; `0.2.2-alpha.*` is deliberately excluded. Official DSH rc.3+ gives `engines.dsh` precedence over peer ranges (peers are ignored when `engines.dsh` is present) and evaluates ranges with prereleases included; strict npm semantics additionally need the explicit second branch, so the declaration is accurate under both readings. The `<0.3.0` upper bound lets future `0.3.0-rc.x` pass the Host gate under its includePrerelease reading; strict consumers exclude it. DSH dependencies, peerDependencies and devDependencies remain pinned to 0.2.1-rc.2 as the development baseline; versions outside the declared Host range aren't supported.
4
4
 
5
5
  ## Supported integration
6
6
 
@@ -28,6 +28,18 @@ Stores use separate CAS and atomic-write boundaries. Committed saves aren't roll
28
28
 
29
29
  ## Execution and recovery
30
30
 
31
+ ### DSH 0.2.2 Host differences
32
+
33
+ DSMM runs identically on 0.2.1 and 0.2.2 Hosts except where 0.2.2 changed public contracts. Runtime capability detection (`agent.model.select` presence, provider-constructor shape) routes each surface; version strings are never consulted.
34
+
35
+ - **Model selection is fixed before step preparation.** DSMM prepares the selection and request proposal together during admission and maintenance, keeping adapter defaults separate from explicit effort. Configured roots with an explicit primary reassert their admitted selection at public running/inbox boundaries; native roots retain native selection authority. A request that conflicts with its step's fixed provider/model/effort is rejected before dispatch, without scheduling another selection or dropping parameters. A picker change racing a running step can therefore produce a refusal; change models while idle for the next-turn boundary. Plugin metadata associates DSMM-written selections and child setup selections observed between native Session and Agent announcements with their exact events. These remain distinguishable on cold activation without treating setup as new manual intent. The records convey no authority, and same-value selections create no synthetic intent.
36
+ - **Cross-route model fallback is unavailable on 0.2.2** (blocked): the request-error contract only allows same-selection retries, so `rate-limit-fallback` route switching degrades to a bounded same-route retry with a one-time diagnostic, and unavailable-route switching refuses outright. 0.2.1 behavior is unchanged. The native `dsh-llm-retry` extension coexists with DSMM's retry ownership.
37
+ - **Pending selection is visible at admission.** A DSMM-configured route becomes the client-visible pending model selection as soon as admission completes, and cross-step route changes surface the Host's `[model changed: ...]` notice. This is native 0.2.2 behavior and is not suppressed.
38
+ - **fs overwrite observation is restored by the DSMM bundle patch.** 0.2.2 compositions disable `@deepseek-ai/dsh-fs-observation-policy` by default; DSMM's bundle patch re-enables it by id, restoring read-before-write and external-modification rejection (`FS_STALE_VERSION`). The user's profile layer still wins and can explicitly disable it.
39
+ - **Adapter capacity defaults changed.** 0.2.2 assumes 1M context / 128K output for models that declare no capacity. Routes served by small endpoints must declare real limits; DSMM's raw seam keeps its explicit-capacity validation.
40
+ - **Fake-IP web fetch loses answer-level enforcement.** 0.2.2's HTTP fetch provider neither resolves nor pins addresses (it dispatches through the process-wide proxy policy), so DSMM's Fake-IP adapter cannot validate DNS answers, NAT64-embedded destinations, or answer-level `denyCidrs`. With configured local denies, direct hostnames and native IPv6 literals fail closed where the resolved or translated destination cannot be checked; IPv4 and mapped IPv4 literals retain entry checks. Existing proxy restrictions remain enforced. DSMM never installs a global dispatcher — process transport policy stays Host-owned.
41
+ - **pi-ai image-offload bounds are supplied by DSMM** where 0.2.2 requires them (defaults mirroring upstream: `maxRequestImages` 50, `imageOffloadCountQuantum` min(10, max)). 0.2.1 profiles carry no such fields.
42
+
31
43
  ### Native history composition
32
44
 
33
45
  DSMM runs against the unpatched native DSH packages: it installs no Host-side patches and injects no bootstrap flags. Historical sessions stay readable through native history surfaces, and a persisted DSMM session resumes with a fresh admission built from the current deployment; persisted mode choices remain user intent, while old delegation authority never survives.
@@ -7,8 +7,9 @@ not read a parent or sibling repository.
7
7
  ## Toolchain
8
8
 
9
9
  Use Node.js 24 for CI/release and pnpm 11.9.0. The package still supports Node.js
10
- 22 or later at runtime and supports DSH `>=0.2.1-rc.2 <0.3.0`, with rc.2 as the
11
- development dependency baseline. Do not change the npm
10
+ 22 or later at runtime. Supported Host versions are listed in
11
+ [compatibility](compatibility.md), with `0.2.1-rc.2` as the development dependency
12
+ baseline. Do not change the npm
12
13
  name `@dsmm/dsmm`, package version, or DSH dependency line as part of routine
13
14
  maintenance unless the release or compatibility scope explicitly requires it.
14
15
 
@@ -41,11 +42,29 @@ base Deepwork prompt, run `pnpm run generate:roles`. CI uses
41
42
  stale. Generated assets are package resources, not an alternate source of truth.
42
43
 
43
44
  Model guidance is subordinate to the selected role and native DSH host contract.
44
- Kimi models share one current-generation `deepwork/kimi.md` calibration; older
45
- generations have no separately maintained prompt. Gemini 4.x, including Argon,
46
- receives a guarded `gemini-4` additive layer based on generic Gemini guidance.
47
- Prompt selection does not change provider, effort, fallback chains or DSH model
48
- capabilities.
45
+ Model identifiers and families select resources in code; calibration text, headings
46
+ and tags are model-neutral. Source filenames retain selector identities. Kimi
47
+ models share `deepwork/kimi.md`; Gemini 4.x, including Argon, receives the selected
48
+ `gemini-4` additive layer. No injected self-identification or textual model guard
49
+ is needed. Prompt selection does not change provider, effort, fallback chains or
50
+ DSH model capabilities.
51
+
52
+ Locale guidance is registered in the exact Agent scope independently of Deepwork
53
+ mode, the Deepwork module and subagent tools. It uses that Agent's captured
54
+ settings; a parent's later changes do not rewrite an existing child's locale.
55
+ Explicit user language requests take precedence. The setting governs visible
56
+ output, not internal reasoning or the Host UI. Role identity overrides use the
57
+ native scoped `harness:identity` section; provider-side hidden system instructions
58
+ are outside this registration boundary.
59
+
60
+ The invocation projection in the system prompt omits provider/model identifiers.
61
+ Actual request routes and native UI observations retain their original metadata.
62
+
63
+ Execution guidance requires direct user-facing conclusions, reasons and actions.
64
+ Use contrast or negation for an expressed misconception or a distinction that
65
+ changes the conclusion, action, safety or scope. State necessary conditions,
66
+ uncertainty and safety limits concretely and once; remove sentences that add no
67
+ useful information without misleading the reader.
49
68
 
50
69
  Effective Deepwork activation includes a short brainstorming orientation. Full
51
70
  brainstorming remains a native skill loaded only when material uncertainty calls
@@ -2,7 +2,7 @@
2
2
 
3
3
  Providers, accounts and credentials remain native DSH configuration, never named-profile contents.
4
4
 
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.
5
+ DSMM supports the Host range declared in [compatibility](compatibility.md), including DSH `0.2.1-rc.2` and `0.2.2-rc.1`. 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
 
@@ -13,7 +13,11 @@ DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`. Standard calls use native prepared
13
13
 
14
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
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.
16
+ An explicit primary takes precedence over a picker selection; inherited routing still uses the native baseline. On DSH 0.2.1, configured routing changes the request without writing the picker. On DSH 0.2.2, the public `agent.model.select()` boundary makes the admitted route visible as the pending selection before preparation. Neither path writes the saved native model preference. Status distinguishes the admitted policy and actual route from a declared model.
17
+
18
+ On 0.2.2, admission and maintenance prepare the selection before a request. Configured roots also bind their cached route on running/inbox boundaries, including the next turn after an idle picker change or mode activation. A running picker can race the next snapshot; a conflicting request then fails before dispatch rather than using an incorrect route. Request-time routing never schedules a deferred correction or removes route parameters to satisfy the Host check. Native roots continue to follow native selection.
19
+
20
+ Selection/proposal effort is distinct from the effective adapter default. With passthrough OFF, a configured effort does not override defaults: the proposal can omit effort while `prepareCall` resolves the adapter's default for HTTP. Explicit native effort remains explicit. DSMM's plugin metadata associates only its own newly appended selection events with their exact routes; it is not admission or delegation authority.
17
21
 
18
22
  `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.
19
23
 
@@ -70,10 +74,18 @@ Saving or selecting a future default preserves route JSON without sending a comp
70
74
 
71
75
  Additional route properties are bounded plain JSON. Their names, values and presence are preserved, including an ordinary property named `customParameters`. In the supported completions seam, `reasoningEffort` and raw `reasoning_effort` are mutually exclusive. So are `maxTokens`, `max_tokens`, `max_completion_tokens` and `max_output_tokens`. A raw token field must match the actual API/model field and native context budget; conflicts refuse before HTTP rather than rewriting values or selecting a fallback. Raw JSON can't override provider/model, messages, tools, authentication, endpoint, headers, signals, callbacks or authority fields. Native attribution remains authoritative.
72
76
 
73
- Every fallback owns its full parameter set; primary-only properties never flow into it. Complete JSON values distinguish parameter-only changes at the same provider/model, while key order doesn't. Missing admission or an unsupported raw adapter must not silently fall through to native dispatch with parameters removed.
77
+ The initial matching candidate preserves downstream-only request controls, while its explicitly configured fields take precedence. Same-route retries retain the failed request's complete explicit parameters. Every fallback owns its full parameter set across later steps and turns; primary-only properties never flow into it. Complete JSON values distinguish parameter-only changes at the same provider/model, while key order doesn't. Missing admission or an unsupported raw adapter must not silently fall through to native dispatch with parameters removed.
74
78
 
75
79
  The native Root model-selection API remains its separate provider/model/effort contract. Its capability and manual-intent checks are independent of unavailable live overlay Apply; it doesn't write a profile selection pointer.
76
80
 
81
+ ## Native dynamic request headers
82
+
83
+ On DSH `0.2.2-rc.1`, DSMM-owned standard and raw Pi-AI adapters preserve the native synchronous `llm-pi-ai/request-headers` hook. Borrowed raw adapters use the original provider registration scope; borrowed standard adapters keep their native hook without a duplicate invocation. Configuration and ownership checks use rc.1's public effective configuration and canonical live Fiber, while rc.2 retains its effective `fiber.config` source. Configuration changes and retired registrations invalidate prepared raw calls.
84
+
85
+ Each inference dispatch receives fresh headers and native frozen request metadata (`provider`, `model`, `sessionId`, `purpose`, `baseURL`). Native attribution remains authoritative after the waterfall. A hook exception follows the native `REQUEST_HEADERS` error path before inference I/O; cancellation and adapter retirement still prevent submission. Model discovery does not acquire an inference-header hook.
86
+
87
+ DSMM adds no business headers or header configuration. Credentials remain native-owned, and route JSON cannot supply headers or authentication fields. DSH `0.2.1-rc.2` retains its existing adapter behavior without a synthetic replacement hook.
88
+
77
89
  ## Invocation selection
78
90
 
79
91
  Calls default to `level:"normal"`, meaning primary or inherited routing. There is no `levels.normal` setting. `low`, `high` and `max` must be configured for that exact target; an unconfigured requested level refuses before a model request. Orchestrator isn't a child delegation target and doesn't accept level configuration. Levels don't synthesize suffixed personas or change workflow ownership.
@@ -106,6 +118,16 @@ Native cold restoration establishes a new exact-Agent admission from current con
106
118
 
107
119
  The child report compares initial route from real `invocation-capture` with live route from that child's `own-native-request-header`. Neither substitutes for the other. Missing capture is `missing-invocation-capture`; live unknown reasons include `no-own-request-header`, `invalid-own-request-header` and `not-observed`. A root header, inherited history prefix or configured primary isn't proof of the child's own executed route. Compatibility invocation projections are labeled as such, not presented as this comparison.
108
120
 
121
+ Foreground tool cards subscribe through the native read-only Gateway stream before the result arrives. Observation carries only provider/model/effort, role/level and exact call/lifetime identity; additional execution parameters remain outside this DTO. Actual effort that the header does not report is shown as unreported. Disconnects or terminal authorization failures invalidate active actual evidence; settled observations stay frozen.
122
+
123
+ Provider call IDs can repeat across requests. Reuse never blocks delegation: ambiguous live card correlation is removed, while each final result retains its own child/run-bound comparison. Watching a child session requires verified live lineage and grants no additional prompt or interrupt authority. Closing observation leaves native execution and delivery ownership unchanged.
124
+
125
+ ## Gemini 4 calibration
126
+
127
+ Models with an explicit Gemini 4 identity share the `gemini-4` additive calibration. Supported names include `gemini-4`, numerical minor versions, `gemini-4.x`/`gemini-4.x-pro`, compact `gemini4`/`gemini4.1`, and their `@default`/`:latest` suffixes. A wildcard name does not claim a precise numeric version. Bare `4.x` and a Gemini provider name alone do not select this calibration.
128
+
129
+ The first recognized model identity controls calibration. Role, planner and category prompt assembly retain their existing layer order and load the additive once; Deepwork-off behavior is unchanged.
130
+
109
131
  ## Generic model parameters
110
132
 
111
133
  All providers use the same native capabilities, `modelParameters`, role primary/fallback/level settings and explicit invocation controls. Omitted effort remains native-owned; DSMM introduces no brand default or advertised-effort fallback. `deepseekV4ProCalibration`, `deepseekV4ProDefaultReasoningEffort`, `deepseekFlashCalibration`, `deepseekFlashDefaultReasoningEffort` and the retired MaxReasoningPresets fields reject configuration input with `deprecated-field`. Operators edit invalid configuration explicitly; historical child evidence is not rewritten.
@@ -1,6 +1,6 @@
1
1
  # Native permissions
2
2
 
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.
3
+ 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. See [compatibility](compatibility.md) for the supported Host range and version-specific limits.
4
4
 
5
5
  ## Permission architecture and extension target
6
6
 
@@ -14,7 +14,7 @@ Operator-created long-lived command/subcommand/path grants and model-proposed au
14
14
 
15
15
  Full access means actual native effective standing `danger-full-access`, not a model argument, a requested escalation or a configured `permissionControl.nativeCommands` target. With that standing authority, DSMM doesn't add an ask, downgrade the sandbox, demand a path permit or refuse an unknown operation because classification facts are missing. The only DSMM restriction is a deterministically matched existing explicit deny blacklist, expressed as a native pre-approval decision. There's no additional inferred high-risk list.
16
16
 
17
- A captured read-only child or a live, composed DSMM read-only preset has an explicit blacklist covering `write`, `edit`, `bash` and `pwsh`. Standing Full access must not bypass that ceiling; useful native reads remain available. Missing ordinary DSMM policy or classification facts do not by themselves establish a read-only role.
17
+ A captured read-only child is restricted by the admitted read-tool allowlist; mutation tools remain excluded even when a native plugin registers an additional tool. Existing explicit restrictions on `write`, `edit`, `bash` and `pwsh` also remain effective. Standing Full access must not bypass the role/tool ceiling. Missing ordinary DSMM policy or classification facts do not by themselves establish a read-only role.
18
18
 
19
19
  Actual DSH manual approval is final for the same call and approved scope. Older DSMM rules, a changed permission revision or epoch, and DSMM internal gates don't veto it afterward. A pending native approval isn't canceled merely because a permission source changes.
20
20
 
@@ -88,10 +88,26 @@ See [running-overlay and approval boundaries](deferred-native-approval-risk.md).
88
88
 
89
89
  Outside-read and web policies apply to their native tool surfaces. They don't provide complete filesystem/network isolation for arbitrary shell commands or replace operating-system checks on the final inode and socket target.
90
90
 
91
+ ### Native multi-file patches on DSH 0.2.2-rc.1
92
+
93
+ The native `tool-fs` plugin exposes `apply_patch` only when its `applyPatch` option is explicitly enabled. The default is `false`. Set the native profile composition row, including when it uses the DSMM `permission-fs` façade:
94
+
95
+ ```yaml
96
+ - id: tool-fs
97
+ config:
98
+ applyPatch: true
99
+ ```
100
+
101
+ Use this option only on a Host that supplies it; DSH `0.2.1-rc.2` has no DSMM replacement patch tool. Loading the native tool does not widen a captured Agent's role or inherited tool ceiling. Native approval, deny/never and cancellation retain ownership.
102
+
103
+ DSMM's bundle enables native `fs-observation-policy`. Existing-file updates, deletes and moves require the native observation/version checks; a later profile override that disables this plugin removes that protection. Patch preflight reads do not grant the model an observation record.
104
+
105
+ The native engine preflights the patch before committing. A syntax, hunk or observation preflight failure leaves files unchanged. Commit is sequential and can partially succeed when a later operation fails or is canceled; a move can write its destination before failing to delete its source. Inspect the returned per-operation results before continuing. Sandbox enforcement remains the responsibility of the effective filesystem provider; neither enabling the tool nor successful preflight grants an outside write.
106
+
91
107
  ### Workspace and system-temp modifications
92
108
 
93
- DSMM does not add a path-range approval layer to native write/edit or ordinary shell modifications, including targets in workspace and system-temp subdirectories. Explicit command/Git rules, role/tool restrictions and native or third-party approval decisions remain effective. A temp path does not automatically approve an independent request.
109
+ DSMM does not add a path-range approval layer to native write/edit/apply_patch or ordinary shell modifications, including targets in workspace and system-temp subdirectories. Temporary-directory access follows the selected DSH mode/backend's full default allowance, without a separate dedicated `temp/dsh` restriction. Explicit command/Git rules, role/tool restrictions and native or third-party approval decisions remain effective. A temp path does not automatically approve an independent request or authorize deleting unrelated temporary files.
94
110
 
95
111
  Native write/edit retain their FS intents, observation/version checks, atomic modification and backend-provided sandbox escalation. Shell execution retains the native executor, standing sandbox and explicit call-scoped escalation. DSMM does not infer every command's effects from its cwd, raise the sandbox mode because a temp path appears in its arguments, or automatically replay a denied command.
96
112
 
97
- Actual write access remains backend-dependent: the stock Windows shell sandbox uses a private temp directory, not the entire shared system temp, and stock LocalFS does not itself enforce sandbox write scopes. DSMM neither changes system-temp ACLs nor supplies a replacement sandbox or FS isolation layer. Absence of an extra DSMM approval does not prove that a backend permits a write or requires approval for every outside write.
113
+ Actual write access remains backend-dependent: the Windows shell sandbox uses a private temp directory, while native sandboxed file providers enforce their declared writable roots, including their default temporary roots. The unsandboxed `LocalFileSystem` implementation does not itself enforce those scopes. DSMM neither changes system-temp ACLs nor supplies a replacement sandbox or FS isolation layer. Absence of an extra DSMM approval does not prove that a backend permits a write or requires approval for every outside write.
package/docs/releasing.md CHANGED
@@ -48,6 +48,6 @@ after either surface is published is a partial release, not authorization to mov
48
48
  or recreate the tag, republish the npm version, or replace an asset. Report the
49
49
  exact workflow result and use a separately authorized new version/tag.
50
50
 
51
- Publication does not install DSMM. Installation requires DSH
52
- `>=0.2.1-rc.2 <0.3.0` and separate authorization, and must preserve accounts, credentials,
53
- history and unrelated configuration.
51
+ Publication does not install DSMM. Installation requires a supported Host listed
52
+ in [compatibility](compatibility.md) and separate authorization, and must preserve
53
+ accounts, credentials, history and unrelated configuration.
package/docs/roadmap.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Version policy
4
4
 
5
- **DSMM 0.3.17 supports DSH `>=0.2.1-rc.2 <0.3.0`.** Official DSH rc.3 gives `engines.dsh` precedence over peer ranges; rc.2 remains the pinned development baseline. Each DSMM version declares its supported Host range independently of its development dependencies. 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 dependency upgrade or support outside the declared range requires deliberate reassessment, not an automatic runtime switch.
5
+ **DSMM 0.3.22 supports DSH `>=0.2.1-rc.2 <0.2.2-0 || >=0.2.2-rc.1 <0.3.0`.** Official DSH rc.3 gives `engines.dsh` precedence over peer ranges; rc.2 remains the pinned development baseline. The dual branch admits the 0.2.2 RC series starting at `0.2.2-rc.1` (the implemented adaptation target, verified against an installed exact-tag SDK anchor) while keeping 0.2.1 behavior identical; `0.2.2-alpha.*` is excluded. Each DSMM version declares its supported Host range independently of its development dependencies. 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 dependency upgrade or support outside the declared range requires deliberate reassessment, not an automatic 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
 
@@ -20,13 +20,17 @@ Agent-scoped skills expose metadata and load bodies lazily, preserving non-DSMM
20
20
 
21
21
  Native call views show the target in collapsed rows, distinguish requested from actual identity, and retain that distinction for partial output, failure, interruption and current-format replay/PTC. Child labels use `Coding: task description`.
22
22
 
23
+ On DSH `0.2.2-rc.1`, native multi-file patches are available through explicit `tool-fs.config.applyPatch: true`, with the default remaining off. DSMM forwards native configuration and retains role/tool ceilings, observation checks and native sandbox/approval ownership; sequential commit can partially succeed. See [native patches](native-permissions.md#native-multi-file-patches-on-dsh-022-rc1). Dynamic Pi-AI request headers retain the native hook across standard/raw paths and the original registration scope; see [request headers](model-routing.md#native-dynamic-request-headers). Gemini 4 series aliases share the existing additive calibration.
24
+
23
25
  ## Remaining capability boundaries
24
26
 
25
27
  | Capability | Current behavior | Requirement for broader support |
26
28
  | --- | --- | --- |
29
+ | Cross-route model fallback on 0.2.2 | 0.2.2 fixes the model selection per step; DSMM keeps same-route bounded retries and degrades `rate-limit-fallback` switching to a same-route retry with a one-time diagnostic. 0.2.1 switching is unchanged. | A public re-selection boundary within the failing step (or per-attempt selection); see [compatibility](compatibility.md#dsh-022-host-differences). |
27
30
  | Profile selection before execution | Existing blank roots can select saved profiles or deployment defaults. Without a session, explicit workspace/Profile selection obtains a native blank, blocks sending until selection is confirmed, then opens it. | Validate native new-session navigation, unsent text/references/attachments and first-send behavior in the target Host. No-session selection is implemented; browser acceptance is separate. |
28
31
  | Session overlay Apply | Eligible quiescent roots, including started/restored roots, can switch under native subtree maintenance and admission CAS. Active work, open turns, queued input and pending approvals/delegation prevent switching. Resident children retain their captures; new delegations use the selected configuration. | Switching during active work remains unsupported. Unprovable external-provider startup is refused; supported coverage uses the same Host lifecycle and agents registry. See [approval boundaries](deferred-native-approval-risk.md). |
29
- | Running-call background handoff | Unavailable. Select waiting or native parent delivery before starting; don't restart a task to simulate transfer. | A supported same-activation ownership/delivery handoff. |
32
+ | Running-call background handoff | Deferred. Select waiting or native parent delivery before starting; existing background dispatch stays unchanged. | A supported same-activation native delivery handoff; see the deferred foreground delegation requirements below. |
33
+ | Granular sandbox access switches | Deferred for later investigation, including system-certificate access for Windows Schannel. No new switch or backend is supplied for this capability. | A supported per-process enforcement mechanism, identified necessary resources, and isolated on/off verification; see [granular sandbox extensions](#deferred-granular-sandbox-access-switches). |
30
34
  | Restricted-role continuation after restoration | Supported roots and continuable children receive fresh admission through awaited `agent/created`, with current role, parent, readonly, tool and depth checks. Historical approvals do not grant current authority. | Broader historical-format support needs public control of persisted persona/composition and pre-activation restoration boundaries. Cold-child image preflight can still inspect historical `agent.options` before current routing takes effect. Unresolvable presets and missing or unsafe identity remain refused; see [recovery boundaries](compatibility.md#native-history-composition). |
31
35
  | Non-disruptive hot update | No uninterrupted live-session guarantee. Retire admissions and let native owners cancel/dispose owned work; guards remain fail-closed. | Native lifecycle support that preserves active task/approval boundaries. |
32
36
  | Catalog-backed raw combinations | Rejected where the complete composition can't be reliably reproduced, regardless of native or DSMM parameter source. Standard calls aren't affected. | A public seam that can reproduce the full catalog composition and preserve native capability/effort semantics. |
@@ -36,6 +40,23 @@ Native call views show the target in collapsed rows, distinguish requested from
36
40
 
37
41
  Search/Fetch retain the explicitly configured native provider. DSMM doesn't automatically enable a direct API, change credentials or forward the recent human question. HTTP Fake-IP behavior and network limits are maintained in [Fake-IP fetch](web-fetch-fakeip.md).
38
42
 
43
+ ## Current: live delegation route observation
44
+
45
+ A read-only native Gateway stream connects admitted role/level and initial versus observed provider/model/effort to the exact parent session and tool call. Actual route evidence comes from the current child's own request header; missing or invalidated active evidence is unknown, and missing effort is not filled from the initial route. Settled observations remain frozen. Descendant-session observation uses verified live lineage without widening root/direct-child mutation controls.
46
+
47
+ Repeated provider call IDs continue to execute normally. When the client cannot disambiguate a reused call ID, live observation for that key is removed; each final tool result retains its own child-bound metadata. Disconnects and observer disposal never transfer execution, cancel the child or create another completion owner.
48
+
49
+ The isolated rc.1 CLI/Gateway acceptance covers observation before foreground completion, independent-peer refusal, child read-only scope, observer disposal and repeated call IDs. Production browser WebSocket/DOM and visual card acceptance remain unverified.
50
+
51
+ ## Deferred: foreground delegation handoff
52
+
53
+ Reassess after DSH updates. The pinned `0.2.1-rc.2` API fixes activation delivery to `caller` or `parent` at startup and exposes no public running-activation handoff. DSMM must not take over completion notification or patch Host internals to supply it.
54
+
55
+ - Allow users to click **Run in background** on an active DSMM delegation started without `run_in_background: true`. Continue the same activation without cancellation, restart or duplicate dispatch; DSH retains execution, cancellation and completion-delivery ownership.
56
+ - Add an option extending manual handoff to foreground delegations involving non-DW Agents while Deepwork is enabled, covering both non-DW callers and non-DW targets. Dispatches that already run in the background need no change; the current native `subagent` tool already uses parent delivery and returns immediately.
57
+ - On a candidate DSH update, check for a public same-activation handoff API and its completion/cancellation race semantics. Read-only live invocation metadata uses a separate supported client channel and does not transfer execution or delivery ownership.
58
+ - Acceptance requires one native completion delivery, no duplicate execution, unchanged permission and ownership checks, and correct handling of completion racing a click. Verify the non-DW option in both states and leave already-background calls untouched. Do not expose an ineffective switch or upgrade/install DSH automatically.
59
+
39
60
  ## Current: native history loading, including the DSMM 0.2.x compatibility target
40
61
 
41
62
  Historical-session loading uses the existing native DSH reader, not a pending DSMM migration subsystem. `ApiSessionList.list()` reads `sessionQuery.listSessions()`; `SessionHistoryController.page()` reads persisted events without activating an Agent. These paths do not require a historical DSMM preset to resolve or a DSMM admission to succeed. Titles are folded from stored events, and history pages expose conversation events, including tool results.
@@ -108,13 +129,22 @@ The extension must preserve the existing interception scope. Native reads that d
108
129
  - The target is configuration-derived elevation only in actual standing `workspace-write`, with no configured writes in `read-only` and no redundant approval in standing full access. Preserve native deny/never/cancellation, independent approval requirements and the finality of manual approval for the same call. This mode-boundary correction is not delivered; existing permission behavior remains unchanged.
109
130
  - Reassess when a supported public source-binding contract becomes available. Verify direct native loading, scoped policy/executor differences, aliases, loading order and asynchronous mode changes through actual approvals and executor policy before implementing. Do not infer authority from tool names, reason text or a controller's unrelated scope, patch Host packages, or upgrade DSH automatically.
110
131
 
111
- ## Planned: external-path and temporary-directory grants
132
+ ## Planned: external-path grants and native temporary-directory policy
133
+
134
+ - Outside-workspace read policy and native external write/edit refusal already exist. Configurable exact-path/tree grants remain subject to enforcement shared by file tools and shell execution.
135
+ - Temporary-directory access follows the full default allowance of the selected DSH mode and backend. DSMM does not narrow that allowance to a dedicated `temp/dsh` subtree. Preserve readonly and explicit deny rules; permission to use temporary storage does not authorize deleting unrelated temporary files.
136
+ - Describe each backend's actual temporary-directory scope accurately. Windows child-process `TMP`/`TEMP` may point to a private session/workspace directory; native file-tool allowances and process confinement must not be presented as identical without evidence.
137
+ - DSH `0.2.1-rc.2` has no additional writable-root field. DSH `0.2.2-rc.1` exposes `additionalWritableRoots`, but its bundled Windows ACL backend rejects additional writable directories. Single-file and independent read/write grants remain separate capability gaps.
138
+ - Broader path support requires public Host enforcement, readonly preservation, path/link validation and rejection of adjacent unapproved locations. Unsupported scopes must not silently become full access or a private ACL framework.
112
139
 
113
- - Outside-workspace read policy and native external write/edit refusal already exist. The missing capability is configurable exact-path/tree grants, particularly external writes and dedicated temporary-directory writes, consistently enforced by file tools and shell execution.
114
- - Reassess the available public DSH interfaces before choosing an implementation. This capability remains deferred rather than blocking command-pattern or configuration improvements.
115
- - Target independent read and write permissions for exact paths or directory trees: normal workspace writes, configured external reads, and writes only to explicitly authorized external locations. A dedicated system-temp `dsh` subtree is a useful opt-in scope for creating, editing and cleaning Agent-owned temporary files; it must not grant access to the entire system temp directory or authorize deleting unrelated files.
116
- - DSH `0.2.1-rc.2` has no additional writable-root field in its standard execution policy. Its Windows backend supplies a private per-session/workspace `dsh-*` directory through child-process `TMP`/`TEMP`; this is neither a configurable fixed `temp/dsh` grant nor proof that native file tools share the same allowance.
117
- - Broader support depends on public Host path-grant interfaces consumed consistently by native file tools and shell confinement. Preserve readonly, resolve path/link boundaries, and verify that adjacent unapproved locations remain unwritable. Do not expose a nonfunctional setting, substitute full access, or implement a private ACL framework in DSMM.
140
+ ## Deferred: granular sandbox access switches
141
+
142
+ - Investigate independently controlled sandbox capability extensions in a later task. This capability is outside the current implementation scope; do not add configuration fields or UI switches that have no enforceable effect.
143
+ - The intended system-certificate compatibility extension is enabled by default once a supported, verified implementation exists. Disabling it must remove that extension for subsequent executions without changing unrelated sandbox policy. TLS certificate verification stays enabled in both states.
144
+ - First establish the cause of Windows curl/Git Schannel failures and the exact required objects, endpoints and access rights. `SEC_E_NO_CREDENTIALS` alone does not identify a missing certificate-store path or prove which permission is needed.
145
+ - DSH `0.2.2-rc.1` exposes file-effect modes and directory roots, not per-process certificate, CNG or RPC endpoint grants. A certificate extension requires a supported Host/runner/native-helper mechanism; adding a DSMM boolean or writable directory cannot supply it.
146
+ - Any Host/native-helper work is separately scoped. Do not modify the installed runtime, system-wide endpoint ACLs or certificate stores, silently change TLS backends, disable verification or broaden to full access as a default remedy.
147
+ - Acceptance requires isolated Windows curl and Git Schannel execution with the extension on and off, preserved TLS verification, rejection of unrelated external writes, readonly preservation and clear configured-versus-effective capability status. Unsupported backends remain explicit; no success claim comes from saving a setting alone.
118
148
 
119
149
  ## Upstream follow-up: Windows Git Schannel
120
150
 
@@ -130,6 +160,8 @@ The extension must preserve the existing interception scope. Native reads that d
130
160
 
131
161
  Reassess deferred capabilities against concrete public Host API changes. A newer release within the supported range does not by itself establish that the missing contracts or their acceptance evidence are available.
132
162
 
163
+ The [DSH 0.2.2-rc.1 adaptation summary](superpowers/plans/2026-11-05-dsh-0.2.2-rc1-adaptation.md) defines the delivered dual-Host behavior, verification and remaining limits. Later RC or stable releases require exact-version interface and runtime verification before broader compatibility claims. Deferred capabilities remain subject to their public Host contracts.
164
+
133
165
  ## Publication and Desktop installation
134
166
 
135
167
  0.3.17 publication uses the version-bound [release controls](releasing.md). Desktop plugin installation follows publication, uses the Desktop-owned carrier and requires DSH `>=0.2.1-rc.2 <0.3.0`. 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.
@@ -1,6 +1,6 @@
1
1
  # Runtime recovery and route strategies
2
2
 
3
- DSMM 0.3.16 targets exactly DSH `0.2.1-rc.2`.
3
+ DSMM recovery runs inside the native DSH request loop. See [Host compatibility](compatibility.md) for supported versions and same-step route-switch limitations.
4
4
 
5
5
  ## Independent role strategies
6
6
 
@@ -19,9 +19,11 @@ With the default deployment policy `rootModelPolicy: "native"`, root model and e
19
19
  | `switchAfterRateLimits` | 3 | 1 to 10 |
20
20
  | `maxSwitches` | 2 | 0 to 10 |
21
21
 
22
- `maxRetries` counts requests after the first on a route; the threshold includes the first distinct failure. Exhausted retry budget stops the attempt even before the switch threshold. Switches consume a finite scope budget. Invalid values refuse instead of becoming different defaults.
22
+ `maxRetries` limits same-route retries after the first request; `switchAfterRateLimits` counts the first distinct failure. Before the switch threshold, exhausted retry budget ends recovery. A permitted switch uses the separate switch budget; when the Host forbids same-step switching, recovery remains on the current route and obeys `maxRetries`. Invalid values refuse instead of becoming different defaults.
23
23
 
24
- `roleRouting.<role>.fallbackRoutes` owns its full route/parameter sets. Explicit `[]` suppresses inherited alternatives; omission inherits the applicable chain. A fallback doesn't inherit primary-only parameters. Omitted effort clears stale explicit effort. `runtimeRecovery.enabled` isn't the role strategy selector, and retained generic status/code lists don't authorize arbitrary transport/server retries or channel hopping.
24
+ `roleRouting.<role>.fallbackRoutes` owns its full route/parameter sets. Explicit `[]` suppresses inherited alternatives; omission inherits `runtimeRecovery.fallbackRoutes`. A fallback doesn't inherit primary-only parameters. Omitted effort clears stale explicit effort.
25
+
26
+ `runtimePolicy` and role-level `strategy` / `rateLimit` control DSMM request recovery. `runtimeRecovery.enabled` gates idle continuation, not role rate-limit retries. The retained `runtimeRecovery.retryOnStatusCodes` and `retryOnCodes` lists do not drive this request-error handler: adding a server status or failure code there does not enable retries for it. Other failures are passed to the native recovery chain, whose effective provider `retryPolicy` determines eligibility and bounds; forwarding alone does not establish that a retry will occur.
25
27
 
26
28
  ## Positive no-output proof and native execution
27
29
 
package/docs/testing.md CHANGED
@@ -55,9 +55,19 @@ serially.
55
55
  | Group | Primary coverage and prerequisites |
56
56
  | --- | --- |
57
57
  | `native-runtime` | Multi-step Host/runtime, resume, module admission, real shell safety and native SDK/CLI wrappers. Some cases require `DSMM_TEST_DSH_ENTRY` or `DSMM_COLD_PROFILE_SDK_ANCHOR`. |
58
+ | `host-boundaries` | Isolated installed-Host CLI routing, cold resume, native/DSMM LLM owners, default effort, tools, child admission and retry boundaries, plus the resolver-free Fake-IP adapter guard. Requires `DSMM_TEST_DSH_ENTRY`; uses a loopback model service and no real API credentials. |
59
+ | `adaptation-remaining` | Targeted dual-Host feature compatibility. Requires `DSMM_TEST_DSH_ENTRY`. Native patch tests run the built package through an isolated CLI, native tool-fs and filesystem sandbox, covering explicit configuration, observation, multi-path effects and permission/cancellation boundaries. Live-delegation tests load the built package in the selected Host and exercise its actual Gateway/Connection stream while loopback child HTTP is held, including observer disposal and repeated provider call IDs; this is not browser DOM acceptance. Dynamic-header tests resolve the selected SDK and run built DSMM owners/adapters through a real Cordis Loader/Pi-AI adapter with loopback HTTP and configuration/retirement checks; their dedicated resolver does not redirect `lib` back to source. Unsupported native capabilities explicitly skip; rc.2 retains its existing filesystem tool set. |
58
60
  | `frontend` | Real browser deployment/profile/editable-choice flows and native role cards. Browser cases require both `DSMM_TEST_DSH_ENTRY` and `DSMM_TEST_PLAYWRIGHT_ENTRY`. |
59
61
  | `delivery` | Actual package/frontend materialization and full native/ordinary module delivery. Native cases require an explicit DSH anchor. |
60
62
 
63
+ For the focused Host boundary suite, set `DSMM_TEST_DSH_ENTRY` to the installed
64
+ Host's package entry and run `pnpm run test:integration -- host-boundaries` after
65
+ building DSMM. Repeat with the other supported Host anchor for compatibility
66
+ coverage. Fixed-selection-only child and fault-injection cases explicitly skip
67
+ when `agent.model.select` is unavailable. The resolver-free Fake-IP case skips on
68
+ a resolver-capable Host; the existing address-policy/transport tests cover that
69
+ implementation.
70
+
61
71
  Missing anchors produce explicit skips. A skipped integration case is unavailable
62
72
  coverage, not a pass, and must be reported as such. The wrapper files remain the
63
73
  entry points for their `.mjs` fixtures so the underlying Host, CLI, approval and
@@ -1,6 +1,6 @@
1
1
  # 显式选择 Fake-IP HTTP fetch
2
2
 
3
- `@dsmm/dsmm/web-fetch-fakeip` 是独立 Cordis 插件,向原生 `ctx.web` 注册唯一 fetch provider ID `dsmm-http-fakeip`。它使用 rc.2 包根公开的 `new HttpFetchProvider(limits, resolver)`,不替换 WebRuntime,不注册 `http`,不改变 Search、工具审批、凭据或系统网络。只有用户主动挂载并选择该 provider 时才应启用;不要将它加入 DSMM 默认插件组合。原生 `http` 和 shell 的网络限制不因此得到修复。
3
+ `@dsmm/dsmm/web-fetch-fakeip` 是独立 Cordis 插件,向原生 `ctx.web` 注册唯一 fetch provider ID `dsmm-http-fakeip`。它在 DSH 0.2.1 使用包根公开的 `new HttpFetchProvider(limits, resolver)`;DSH 0.2.2 的无 resolver 路径按下述能力边界处理。它不替换 WebRuntime,不注册 `http`,不改变 Search、工具审批、凭据或系统网络。只有用户主动挂载并选择该 provider 时才应启用;不要将它加入 DSMM 默认插件组合。原生 `http` 和 shell 的网络限制不因此得到修复。
4
4
 
5
5
  ## 集成与选择
6
6
 
@@ -28,7 +28,13 @@ DSMM 包必须具备以下依赖和发布入口,才能使用此插件:
28
28
 
29
29
  `denyCidrs` 只增加本地拒绝,例如 `['198.18.0.1/16', '8.8.8.0/24']`;主机位不扩大 CIDR,前一项等价于拒绝固定 `198.18.0.0/16`。mapped IPv6 和对应 IPv4 的拒绝相互覆盖。没有任意 allow-CIDR 配置:唯一例外固定为 `198.18.0.0/16`,不是 `/15`,不是其他私网。
30
30
 
31
- ## 地址与代理边界
31
+ ## Host 能力边界
32
+
33
+ 以下 DNS answer、NAT64 发现和 pinned lookup 保证适用于仍公开 resolver 注入的 DSH 0.2.1。DSH 0.2.2 的原生 HTTP provider 通过进程 dispatcher 发送请求,不再调用该 resolver;DSMM 不安装替代 dispatcher,也不把入口检查称为 DNS pinning。
34
+
35
+ 0.2.2 下配置 `denyCidrs` 时,无法检查最终解析地址的域名路径及无法验证 NAT64 内嵌目的地址的非 mapped IPv6 literal 均 fail-closed。IPv4 和 mapped IPv4 literal 继续执行入口 deny 校验。没有本地 deny 时,DNS 应答级检查与 NAT64 内嵌地址检查仍不可用;原生传输和代理策略由 Host 负责。代理与 literal 的既有入口限制保持有效。
36
+
37
+ ## 地址与代理边界(DSH 0.2.1 resolver 路径)
32
38
 
33
39
  - 系统 DNS 使用 `all: true, order: 'verbatim'`。完整答案必须非空,每项 family 和地址须有效;任一地址被拒绝即拒绝整个请求,不筛掉坏答案继续连接。
34
40
  - 允许公网 unicast 和精确 Fake-IP `/16`;mapped IPv6 按内嵌 IPv4 判断。显式 deny 优先,loopback、私网、链路本地、`198.19.*` 及原生 transition/NAT64 特殊地址继续拒绝。
package/dsh-plugin.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "manifestVersion": "0.15",
4
4
  "id": "com.hugefiver.dsmm",
5
5
  "name": "DSMM",
6
- "version": "0.3.17",
6
+ "version": "0.3.23",
7
7
  "facets": {
8
8
  "host": {
9
9
  "entry": "lib/index.js",
@@ -0,0 +1,6 @@
1
+ import type { DshAgent, DshContext } from "./dsh-types.js";
2
+ import type { DsmmSettingsGetter } from "./settings.js";
3
+ import type { DsmmRolePolicy } from "./role-policy.js";
4
+ import type { DeepworkModeController } from "./state.js";
5
+ export declare function registerAgentPromptScope(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter, policy: DsmmRolePolicy, agent: DshAgent, signal: AbortSignal): void;
6
+ //# sourceMappingURL=agent-prompt-scope.d.ts.map