@dsmm/dsmm 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/README.md +38 -66
  2. package/agent-presets/dsmm-builder/agent.cordis.yml +10 -2015
  3. package/agent-presets/dsmm-clarifier/agent.cordis.yml +24 -343
  4. package/agent-presets/dsmm-code-search/agent.cordis.yml +19 -6
  5. package/agent-presets/dsmm-coding/agent.cordis.yml +19 -438
  6. package/agent-presets/dsmm-complex/agent.cordis.yml +23 -1009
  7. package/agent-presets/dsmm-creative/agent.cordis.yml +25 -442
  8. package/agent-presets/dsmm-cross-cutting/agent.cordis.yml +29 -1013
  9. package/agent-presets/dsmm-deep/agent.cordis.yml +24 -1008
  10. package/agent-presets/dsmm-doc-search/agent.cordis.yml +19 -6
  11. package/agent-presets/dsmm-documenting/agent.cordis.yml +26 -439
  12. package/agent-presets/dsmm-frontend/agent.cordis.yml +21 -440
  13. package/agent-presets/dsmm-hard-reasoning/agent.cordis.yml +22 -441
  14. package/agent-presets/dsmm-media-reader/agent.cordis.yml +19 -6
  15. package/agent-presets/dsmm-normal-task/agent.cordis.yml +19 -438
  16. package/agent-presets/dsmm-oracle/agent.cordis.yml +25 -340
  17. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +25 -340
  18. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +29 -2025
  19. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +24 -341
  20. package/agent-presets/dsmm-planner/agent.cordis.yml +14 -344
  21. package/agent-presets/dsmm-quick/agent.cordis.yml +19 -6
  22. package/agent-presets/dsmm-research/agent.cordis.yml +23 -8
  23. package/agent-presets/dsmm-reviewer/agent.cordis.yml +25 -340
  24. package/docs/agent-presets.md +36 -52
  25. package/docs/compatibility.md +50 -108
  26. package/docs/deferred-native-approval-risk.md +19 -0
  27. package/docs/design.md +2 -2
  28. package/docs/lsp.md +11 -21
  29. package/docs/migration-from-ocmm.md +2 -2
  30. package/docs/model-routing.md +84 -59
  31. package/docs/native-permissions.md +35 -0
  32. package/docs/profiles.md +40 -87
  33. package/docs/releasing.md +83 -2
  34. package/docs/roadmap.md +71 -17
  35. package/docs/settings-status.md +34 -169
  36. package/docs/skill-sync.md +52 -15
  37. package/lib/child-admission-contract.d.ts +37 -0
  38. package/lib/child-admission-contract.js +2 -0
  39. package/lib/child-admission.d.ts +42 -0
  40. package/lib/child-admission.js +162 -0
  41. package/lib/child-capture.d.ts +81 -0
  42. package/lib/child-capture.js +203 -0
  43. package/lib/child-evidence.d.ts +17 -0
  44. package/lib/child-evidence.js +43 -0
  45. package/lib/client/ChildrenPanel.d.ts +43 -0
  46. package/lib/client/ChildrenPanel.js +82 -0
  47. package/lib/client/DeploymentPage.js +15 -8
  48. package/lib/client/EditableChoice.d.ts +17 -0
  49. package/lib/client/EditableChoice.js +49 -0
  50. package/lib/client/PermissionsPanel.d.ts +14 -0
  51. package/lib/client/PermissionsPanel.js +46 -0
  52. package/lib/client/ProfilesSection.js +30 -15
  53. package/lib/client/RoleAvailability.d.ts +7 -0
  54. package/lib/client/RoleAvailability.js +19 -0
  55. package/lib/client/SessionProfiles.js +27 -9
  56. package/lib/client/StructuredEditor.js +15 -7
  57. package/lib/client/children-controller.d.ts +98 -0
  58. package/lib/client/children-controller.js +296 -0
  59. package/lib/client/children-locales.d.ts +367 -0
  60. package/lib/client/children-locales.js +69 -0
  61. package/lib/client/controller.d.ts +6 -1
  62. package/lib/client/controller.js +14 -8
  63. package/lib/client/deployment-data.d.ts +2 -1
  64. package/lib/client/deployment-data.js +34 -5
  65. package/lib/client/deployment-locales.d.ts +4 -0
  66. package/lib/client/deployment-locales.js +11 -2
  67. package/lib/client/diagnostics.d.ts +14 -0
  68. package/lib/client/diagnostics.js +53 -0
  69. package/lib/client/index.d.ts +4 -0
  70. package/lib/client/index.js +96 -2
  71. package/lib/client/locales.d.ts +54 -0
  72. package/lib/client/locales.js +34 -16
  73. package/lib/client/permission-client.d.ts +16 -0
  74. package/lib/client/permission-client.js +38 -0
  75. package/lib/client/permission-controller.d.ts +62 -0
  76. package/lib/client/permission-controller.js +149 -0
  77. package/lib/client/permission-locales.d.ts +114 -0
  78. package/lib/client/permission-locales.js +75 -0
  79. package/lib/client/session-labels.js +4 -4
  80. package/lib/client/structured.js +19 -5
  81. package/lib/client/styles.d.ts +1 -1
  82. package/lib/client/styles.js +20 -0
  83. package/lib/client.js +5780 -1679
  84. package/lib/core-permission-authority.d.ts +18 -0
  85. package/lib/core-permission-authority.js +255 -0
  86. package/lib/core-permissions.d.ts +8 -0
  87. package/lib/core-permissions.js +33 -0
  88. package/lib/delivery-authority.d.ts +68 -0
  89. package/lib/delivery-authority.js +260 -0
  90. package/lib/deployment-config.d.ts +23 -0
  91. package/lib/deployment-config.js +61 -40
  92. package/lib/deployment-permission-rules.d.ts +55 -0
  93. package/lib/deployment-permission-rules.js +306 -0
  94. package/lib/dsh-types.d.ts +10 -4
  95. package/lib/guards.d.ts +1 -1
  96. package/lib/guards.js +29 -8
  97. package/lib/host-llm-startup.d.ts +41 -0
  98. package/lib/host-llm-startup.js +65 -0
  99. package/lib/host-llm.d.ts +92 -0
  100. package/lib/host-llm.js +325 -0
  101. package/lib/index.d.ts +15 -4
  102. package/lib/index.js +300 -47
  103. package/lib/legacy-child-policy.d.ts +51 -0
  104. package/lib/legacy-child-policy.js +123 -0
  105. package/lib/legacy-read-composition.d.ts +20 -0
  106. package/lib/legacy-read-composition.js +144 -0
  107. package/lib/legacy-read-contracts.d.ts +157 -0
  108. package/lib/legacy-read-contracts.js +39 -0
  109. package/lib/legacy-read-host.d.ts +19 -0
  110. package/lib/legacy-read-host.js +67 -0
  111. package/lib/legacy-read-integration.d.ts +121 -0
  112. package/lib/legacy-read-integration.js +522 -0
  113. package/lib/legacy-read-proxy.d.ts +26 -0
  114. package/lib/legacy-read-proxy.js +237 -0
  115. package/lib/live-pi-ai-owner.d.ts +18 -0
  116. package/lib/live-pi-ai-owner.js +144 -0
  117. package/lib/llm-runtime.d.ts +11 -0
  118. package/lib/llm-runtime.js +21 -0
  119. package/lib/managed-settings.d.ts +5 -0
  120. package/lib/managed-settings.js +14 -0
  121. package/lib/model-parameter-policy.d.ts +11 -0
  122. package/lib/model-parameter-policy.js +27 -0
  123. package/lib/model-routing.js +28 -17
  124. package/lib/modules.d.ts +13 -5
  125. package/lib/modules.js +17 -1
  126. package/lib/native-child-evidence.d.ts +42 -0
  127. package/lib/native-child-evidence.js +133 -0
  128. package/lib/native-pi-ai-wire.d.ts +37 -0
  129. package/lib/native-pi-ai-wire.js +261 -0
  130. package/lib/native-scope.js +1 -1
  131. package/lib/permission-bash.d.ts +6 -0
  132. package/lib/permission-bash.js +7 -0
  133. package/lib/permission-control.d.ts +73 -0
  134. package/lib/permission-control.js +205 -0
  135. package/lib/permission-controller.d.ts +68 -0
  136. package/lib/permission-controller.js +317 -0
  137. package/lib/permission-errors.d.ts +7 -0
  138. package/lib/permission-errors.js +21 -0
  139. package/lib/permission-fs-search.d.ts +5 -0
  140. package/lib/permission-fs-search.js +7 -0
  141. package/lib/permission-fs.d.ts +5 -0
  142. package/lib/permission-fs.js +7 -0
  143. package/lib/permission-native-access.d.ts +11 -0
  144. package/lib/permission-native-access.js +6 -0
  145. package/lib/permission-native-command.d.ts +10 -0
  146. package/lib/permission-native-command.js +93 -0
  147. package/lib/permission-native-rules.d.ts +75 -0
  148. package/lib/permission-native-rules.js +278 -0
  149. package/lib/permission-pwsh.d.ts +6 -0
  150. package/lib/permission-pwsh.js +7 -0
  151. package/lib/permission-remote.d.ts +26 -0
  152. package/lib/permission-remote.js +53 -0
  153. package/lib/permission-rpc.d.ts +29 -0
  154. package/lib/permission-rpc.js +152 -0
  155. package/lib/permission-rules.d.ts +115 -0
  156. package/lib/permission-rules.js +256 -0
  157. package/lib/permission-settings.d.ts +45 -0
  158. package/lib/permission-settings.js +48 -0
  159. package/lib/permission-shell.d.ts +38 -0
  160. package/lib/permission-shell.js +150 -0
  161. package/lib/permission-web.d.ts +5 -0
  162. package/lib/permission-web.js +7 -0
  163. package/lib/preset-registry.js +36 -25
  164. package/lib/profile-diagnostics.d.ts +45 -0
  165. package/lib/profile-diagnostics.js +148 -0
  166. package/lib/profile-locale.d.ts +3 -0
  167. package/lib/profile-locale.js +2 -0
  168. package/lib/profile-remote.d.ts +8 -0
  169. package/lib/profile-remote.js +163 -39
  170. package/lib/profile-rpc.d.ts +4 -3
  171. package/lib/profile-rpc.js +14 -12
  172. package/lib/profile-runtime.d.ts +40 -1
  173. package/lib/profile-runtime.js +368 -93
  174. package/lib/profile-store.d.ts +11 -0
  175. package/lib/profile-store.js +143 -11
  176. package/lib/profile-types.d.ts +70 -1
  177. package/lib/profile-types.js +1 -0
  178. package/lib/profiles.d.ts +16 -2
  179. package/lib/profiles.js +156 -79
  180. package/lib/prompt-content.js +1 -1
  181. package/lib/prompts.d.ts +37 -2
  182. package/lib/prompts.js +111 -9
  183. package/lib/recovery-policy.js +20 -7
  184. package/lib/role-control-remote.d.ts +38 -0
  185. package/lib/role-control-remote.js +211 -0
  186. package/lib/role-control-rpc.d.ts +51 -0
  187. package/lib/role-control-rpc.js +377 -0
  188. package/lib/role-control-types.d.ts +92 -0
  189. package/lib/role-control-types.js +8 -0
  190. package/lib/role-invocation.d.ts +47 -0
  191. package/lib/role-invocation.js +135 -0
  192. package/lib/role-llm-runtime.d.ts +17 -0
  193. package/lib/role-llm-runtime.js +62 -0
  194. package/lib/role-llm.d.ts +31 -0
  195. package/lib/role-llm.js +66 -0
  196. package/lib/role-policy.d.ts +49 -8
  197. package/lib/role-policy.js +437 -60
  198. package/lib/role-providers.d.ts +1 -1
  199. package/lib/role-providers.js +30 -35
  200. package/lib/role-routing.d.ts +11 -2
  201. package/lib/role-routing.js +42 -25
  202. package/lib/role-runs.d.ts +135 -0
  203. package/lib/role-runs.js +304 -0
  204. package/lib/role-subagents.d.ts +58 -3
  205. package/lib/role-subagents.js +169 -56
  206. package/lib/roles.d.ts +5 -6
  207. package/lib/roles.js +10 -39
  208. package/lib/route-json.d.ts +19 -0
  209. package/lib/route-json.js +129 -0
  210. package/lib/routing-policy.d.ts +2 -0
  211. package/lib/routing-policy.js +12 -2
  212. package/lib/runtime-integration.d.ts +112 -0
  213. package/lib/runtime-integration.js +784 -0
  214. package/lib/runtime-recovery.js +18 -8
  215. package/lib/settings.d.ts +47 -13
  216. package/lib/settings.js +217 -82
  217. package/lib/skills.js +2 -2
  218. package/lib/status.d.ts +10 -1
  219. package/lib/status.js +11 -8
  220. package/lib/subagent-runtime.d.ts +45 -0
  221. package/lib/subagent-runtime.js +131 -0
  222. package/package.json +106 -56
  223. package/patches/subagent-runtime.yml +15 -0
  224. package/prompts/deepseek-flash.md +1 -1
  225. package/prompts/deepseek-v4-pro.md +2 -2
  226. package/prompts/deepwork.md +27 -18
  227. package/prompts/source/agents/clarifier.md +5 -3
  228. package/prompts/source/agents/orchestrator.md +18 -9
  229. package/prompts/source/agents/plan-critic.md +5 -1
  230. package/prompts/source/agents/planner.md +4 -2
  231. package/prompts/source/agents/reviewer.md +6 -0
  232. package/prompts/source/category/complex.md +4 -4
  233. package/prompts/source/category/creative.md +6 -4
  234. package/prompts/source/category/cross-cutting.md +10 -8
  235. package/prompts/source/category/deep.md +5 -3
  236. package/prompts/source/category/documenting.md +7 -1
  237. package/prompts/source/category/frontend.md +2 -2
  238. package/prompts/source/category/hard-reasoning.md +3 -3
  239. package/prompts/source/category/research.md +4 -2
  240. package/prompts/source/deepwork/claude-opus-5.md +2 -2
  241. package/prompts/source/deepwork/codex.md +1 -1
  242. package/prompts/source/deepwork/default.md +22 -15
  243. package/prompts/source/deepwork/gemini.md +23 -16
  244. package/prompts/source/deepwork/glm.md +21 -14
  245. package/prompts/source/deepwork/gpt.md +12 -6
  246. package/prompts/source/deepwork/planner.md +8 -5
  247. package/prompts/source/manifest.json +178 -63
  248. package/prompts/source/shared/dsh-host-contract.md +5 -3
  249. package/prompts/source/shared/locale.md +2 -2
  250. package/prompts/source/terminal/orchestrator.md +1 -1
  251. package/scripts/cold-profile-composition.mjs +329 -0
  252. package/scripts/cold-profile-sources.mjs +238 -0
  253. package/scripts/migrate-cold-profile.mjs +315 -0
  254. package/skills/ast-grep/SKILL.md +7 -4
  255. package/skills/brainstorming/SKILL.md +43 -22
  256. package/skills/coding-agent-sessions/SKILL.md +7 -4
  257. package/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -46
  258. package/skills/coding-agent-sessions/scripts/tests/test_pi_family_scanners.py +130 -130
  259. package/skills/debugging/SKILL.md +14 -9
  260. package/skills/debugging/references/methodology/00-setup.md +14 -62
  261. package/skills/debugging/references/methodology/02-investigate.md +4 -4
  262. package/skills/debugging/references/methodology/03-flaky-triage.md +3 -3
  263. package/skills/debugging/references/methodology/04-hard-reasoning-escalation.md +2 -14
  264. package/skills/debugging/references/methodology/06-fix.md +6 -6
  265. package/skills/debugging/references/methodology/08-qa.md +5 -5
  266. package/skills/debugging/references/methodology/09-cleanup.md +15 -153
  267. package/skills/debugging/references/methodology/partial-runtime-evidence.md +3 -16
  268. package/skills/debugging/references/runtimes/bundled-js-binary.md +1 -16
  269. package/skills/debugging/references/runtimes/native-binary.md +9 -54
  270. package/skills/debugging/references/runtimes/node.md +4 -15
  271. package/skills/debugging/references/runtimes/python.md +3 -15
  272. package/skills/debugging/references/runtimes/rust.md +2 -18
  273. package/skills/debugging/references/tools/dap.md +1 -1
  274. package/skills/debugging/references/tools/ghidra.md +4 -15
  275. package/skills/debugging/references/tools/playwright-cli.md +3 -15
  276. package/skills/debugging/references/tools/pwntools.md +4 -16
  277. package/skills/dispatching-parallel-agents/SKILL.md +18 -16
  278. package/skills/frontend/SKILL.md +7 -4
  279. package/skills/frontend/references/design/react-dev-tooling-skill.md +1 -1
  280. package/skills/git-master/SKILL.md +7 -4
  281. package/skills/init-deep/SKILL.md +7 -4
  282. package/skills/receiving-code-review/SKILL.md +17 -12
  283. package/skills/remove-ai-slops/SKILL.md +39 -38
  284. package/skills/requesting-code-review/SKILL.md +19 -17
  285. package/skills/requesting-code-review/code-reviewer.md +13 -1
  286. package/skills/subagent-driven-development/SKILL.md +29 -26
  287. package/skills/subagent-driven-development/implementer-prompt.md +29 -11
  288. package/skills/subagent-driven-development/spec-reviewer-prompt.md +6 -1
  289. package/skills/using-git-worktrees/SKILL.md +7 -4
  290. package/skills/writing-plans/SKILL.md +29 -24
  291. package/skills/writing-plans/plan-document-reviewer-prompt.md +10 -1
package/lib/status.js CHANGED
@@ -45,6 +45,10 @@ export function createDsmmStatusSnapshot(input) {
45
45
  && route.model === selectedRoute.model && route.reasoningEffort === selectedRoute.reasoningEffort);
46
46
  return {
47
47
  version: DSMM_STATUS_VERSION,
48
+ ...(input.admission?.roleAvailability === undefined ? {} : { roles: structuredClone(input.admission.roleAvailability) }),
49
+ ...(input.admission?.warnings === undefined ? {} : { warnings: structuredClone(input.admission.warnings) }),
50
+ ...(input.subagentRuntime === undefined && input.admission?.subagentRuntime === undefined ? {} : { subagentRuntime: { ...(input.subagentRuntime ?? input.admission.subagentRuntime) } }),
51
+ ...(settings.locale === undefined ? {} : { locale: { value: settings.locale, source: input.admission?.sources?.locale ?? "defaults", capture: input.admission?.sourceCaptures?.fields.locale ?? "admission" } }),
48
52
  ...(input.modules === undefined ? {} : { modules: structuredClone(input.modules) }),
49
53
  ...(input.admission?.store === undefined ? {} : { profileStore: { ...input.admission.store } }),
50
54
  ...(input.admission?.deployment === undefined ? {} : { deployment: {
@@ -170,11 +174,8 @@ function resolveRoute(agent) {
170
174
  function readString(value) {
171
175
  return typeof value === "string" ? value : undefined;
172
176
  }
173
- function resolvePolicyEffort(settings, selectedPreset, flash) {
174
- const presets = flash ? settings.deepseekFlashMaxReasoningPresets : settings.deepseekV4ProMaxReasoningPresets;
175
- return isDsmmRoleId(selectedPreset) && presets.includes(selectedPreset)
176
- ? "max"
177
- : flash ? settings.deepseekFlashDefaultReasoningEffort : settings.deepseekV4ProDefaultReasoningEffort;
177
+ function resolvePolicyEffort(settings, _selectedPreset, flash) {
178
+ return flash ? settings.deepseekFlashDefaultReasoningEffort : settings.deepseekV4ProDefaultReasoningEffort;
178
179
  }
179
180
  function resolveCalibration(input) {
180
181
  if (input.calibration === "off") {
@@ -196,23 +197,25 @@ function resolveCalibration(input) {
196
197
  /** Read-only diagnostics only; never use this copy as configuration input. */
197
198
  export function readOnlySettings(settings) {
198
199
  return {
200
+ permissionControl: structuredClone(settings.permissionControl),
201
+ modelParameters: { ...settings.modelParameters },
199
202
  modules: { deepwork: { enabled: settings.modules.deepwork.enabled } },
203
+ ...(settings.locale === undefined ? {} : { locale: settings.locale }),
200
204
  modeName: settings.modeName,
201
205
  defaultActive: settings.defaultActive,
202
206
  promptOrder: settings.promptOrder,
203
207
  deepseekV4ProCalibration: settings.deepseekV4ProCalibration,
204
208
  deepseekV4ProDefaultReasoningEffort: settings.deepseekV4ProDefaultReasoningEffort,
205
- deepseekV4ProMaxReasoningPresets: [...settings.deepseekV4ProMaxReasoningPresets],
206
209
  deepseekFlashCalibration: settings.deepseekFlashCalibration,
207
210
  deepseekFlashDefaultReasoningEffort: settings.deepseekFlashDefaultReasoningEffort,
208
- deepseekFlashMaxReasoningPresets: [...settings.deepseekFlashMaxReasoningPresets],
209
211
  skills: { ...settings.skills },
210
212
  roles: { ...settings.roles },
211
213
  roleRouting: Object.fromEntries(Object.entries(settings.roleRouting).map(([role, policy]) => [role, {
212
214
  ...(policy.primary === undefined ? {} : { primary: { ...policy.primary } }),
213
215
  ...(policy.fallbackRoutes === undefined ? {} : { fallbackRoutes: policy.fallbackRoutes.map((route) => ({ ...route })) }),
214
216
  ...(policy.strategy === undefined ? {} : { strategy: policy.strategy }),
215
- ...(policy.rateLimit === undefined ? {} : { rateLimit: { ...policy.rateLimit } })
217
+ ...(policy.rateLimit === undefined ? {} : { rateLimit: { ...policy.rateLimit } }),
218
+ ...(policy.levels === undefined ? {} : { levels: structuredClone(policy.levels) })
216
219
  }])),
217
220
  runtimePolicy: { strategy: settings.runtimePolicy.strategy, rateLimit: { ...settings.runtimePolicy.rateLimit } },
218
221
  presets: { ...settings.presets, ...(settings.presets.root === undefined ? {} : { root: "<configured>" }) },
@@ -0,0 +1,45 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { Agent } from "@deepseek-ai/dsh-agent";
3
+ import type { ContentBlock, MessageId } from "@deepseek-ai/dsh-llm";
4
+ import type { SessionId } from "@deepseek-ai/dsh-session";
5
+ import { SubagentRuntime } from "@deepseek-ai/dsh-subagent";
6
+ import type { SubagentPromptReceipt, SubagentPromptRequest, SubagentProvider, SubagentSendMessageOptions } from "@deepseek-ai/dsh-subagent";
7
+ import { DsmmDeliveryAuthority } from "./delivery-authority.js";
8
+ import type { DeliveryAdmission, DeliveryParentClassifier } from "./delivery-authority.js";
9
+ export { DsmmDeliveryAuthority } from "./delivery-authority.js";
10
+ export type { DeliveryAdmission, DeliveryFenceView, DeliveryParentClassifier, DeliveryPolicyBinding, ParentAdmissionTicket } from "./delivery-authority.js";
11
+ declare module "@deepseek-ai/dsh-typert-protocol/types" {
12
+ interface RemoteErrorDetailsMap {
13
+ "subagent/unauthorized": {
14
+ readonly childSessionId: SessionId;
15
+ };
16
+ }
17
+ }
18
+ type ContinuableStart = SubagentRuntime["startContinuable"];
19
+ type ContinuablePreflight = (spec: Parameters<ContinuableStart>[0], start: ContinuableStart) => ReturnType<ContinuableStart>;
20
+ /** Explicit startup replacement for the stock row, in the SAME Host service scope. */
21
+ export declare class DsmmSubagentRuntime<A extends DeliveryAdmission = DeliveryAdmission, E = unknown> extends SubagentRuntime {
22
+ readonly authority: DsmmDeliveryAuthority<A, E>;
23
+ private readonly waiters;
24
+ private readonly lifetime;
25
+ private requiredProviders;
26
+ private continuablePreflight?;
27
+ constructor(ctx: Context, config: ConstructorParameters<typeof SubagentRuntime>[1], hostClassifier?: DeliveryParentClassifier);
28
+ /** Host composition may select spawn/fork names before enabling the policy. */
29
+ requireProviders(names: readonly string[]): void;
30
+ registerProvider(provider: SubagentProvider): () => void;
31
+ /** Host entry route preparation before native normalization loses caller option provenance. */
32
+ configureContinuablePreflight(preflight: ContinuablePreflight, signal: AbortSignal): void;
33
+ startContinuable(spec: Parameters<ContinuableStart>[0]): ReturnType<ContinuableStart>;
34
+ /** Fulfillment proves this exact registry contains the provider, not just a mounted plugin. */
35
+ waitForProvider(name: string, signal?: AbortSignal): Promise<SubagentProvider>;
36
+ /** Policy explicitly enabled AND every required provider actually registered. */
37
+ waitUntilReady(signal?: AbortSignal): Promise<void>;
38
+ sendMessage(sender: Agent, targetId: SessionId, content: ContentBlock[], options: SubagentSendMessageOptions): Promise<MessageId>;
39
+ prompt(request: SubagentPromptRequest, callerSignal: AbortSignal): Promise<SubagentPromptReceipt>;
40
+ private wakeWaiters;
41
+ private substrateReady;
42
+ private waitFor;
43
+ }
44
+ export default DsmmSubagentRuntime;
45
+ //# sourceMappingURL=subagent-runtime.d.ts.map
@@ -0,0 +1,131 @@
1
+ import { SubagentError, SubagentRuntime } from "@deepseek-ai/dsh-subagent";
2
+ import { RemoteError } from "@deepseek-ai/dsh-typert-protocol";
3
+ import { TYPERT as NATIVE_SUBAGENT_HOST } from "@deepseek-ai/dsh-subagent/typert";
4
+ import { DsmmDeliveryAuthority, scopeLifetime } from "./delivery-authority.js";
5
+ export { DsmmDeliveryAuthority } from "./delivery-authority.js";
6
+ /** Explicit startup replacement for the stock row, in the SAME Host service scope. */
7
+ export class DsmmSubagentRuntime extends SubagentRuntime {
8
+ authority;
9
+ waiters = new Set();
10
+ lifetime = new AbortController();
11
+ requiredProviders = ["spawn"];
12
+ continuablePreflight;
13
+ constructor(ctx, config, hostClassifier) {
14
+ if (ctx.get("subagents") !== undefined) {
15
+ throw new SubagentError("Explicit DSMM startup composition must exclude the stock subagents row; restart with one provider.", "DUPLICATE_PROVIDER");
16
+ }
17
+ super(ctx, config);
18
+ this.authority = new DsmmDeliveryAuthority(ctx, () => this.substrateReady(), () => this.wakeWaiters(), hostClassifier);
19
+ ctx.inject(["typert"], (remoteCtx) => {
20
+ if (remoteCtx.typert.getPackage("@deepseek-ai/dsh-subagent", "host") === undefined) {
21
+ remoteCtx.typert.register(NATIVE_SUBAGENT_HOST);
22
+ }
23
+ this.wakeWaiters();
24
+ });
25
+ ctx.on("subagent/provider-added", () => this.wakeWaiters());
26
+ ctx.on("subagent/provider-removed", () => this.wakeWaiters());
27
+ scopeLifetime(ctx, "dsmm.subagents: close registration barriers", () => { this.lifetime.abort(); this.wakeWaiters(); });
28
+ }
29
+ /** Host composition may select spawn/fork names before enabling the policy. */
30
+ requireProviders(names) {
31
+ if (this.authority.view().deliveryFenceReady || names.length === 0 || names.some((name) => name.length === 0)) {
32
+ throw new SubagentError("Provider readiness must be configured before DSMM admission becomes ready.", "UNAUTHORIZED");
33
+ }
34
+ this.requiredProviders = [...new Set(names)];
35
+ this.wakeWaiters();
36
+ }
37
+ registerProvider(provider) {
38
+ const dispose = super.registerProvider(provider);
39
+ this.wakeWaiters();
40
+ return dispose;
41
+ }
42
+ /** Host entry route preparation before native normalization loses caller option provenance. */
43
+ configureContinuablePreflight(preflight, signal) {
44
+ signal.throwIfAborted();
45
+ if (this.continuablePreflight !== undefined)
46
+ throw new SubagentError("Continuable routing already has a Host owner", "UNAUTHORIZED");
47
+ this.continuablePreflight = preflight;
48
+ signal.addEventListener("abort", () => { if (this.continuablePreflight === preflight)
49
+ this.continuablePreflight = undefined; }, { once: true });
50
+ }
51
+ startContinuable(spec) {
52
+ const start = request => super.startContinuable(request);
53
+ return this.continuablePreflight === undefined ? start(spec) : this.continuablePreflight(spec, start);
54
+ }
55
+ /** Fulfillment proves this exact registry contains the provider, not just a mounted plugin. */
56
+ waitForProvider(name, signal) {
57
+ return this.waitFor(() => this.getProvider(name), signal);
58
+ }
59
+ /** Policy explicitly enabled AND every required provider actually registered. */
60
+ waitUntilReady(signal) {
61
+ return this.waitFor(() => this.authority.view().deliveryFenceReady ? true : undefined, signal).then(() => { });
62
+ }
63
+ async sendMessage(sender, targetId, content, options) {
64
+ // The SDK alone validates exact residency and adjacency on child -> parent.
65
+ if (sender.session.header.parentSession === targetId || !this.authority.isManaged(sender)) {
66
+ return super.sendMessage(sender, targetId, content, options);
67
+ }
68
+ const ticket = this.authority.acquireParentTicket(sender);
69
+ const signal = AbortSignal.any([options.signal, ticket.signal]);
70
+ const evidence = await this.authority.resolveChildEvidence(ticket, targetId, signal);
71
+ this.authority.assertDelivery(ticket, targetId, evidence);
72
+ signal.throwIfAborted();
73
+ return super.sendMessage(sender, targetId, content, { ...options, signal });
74
+ }
75
+ async prompt(request, callerSignal) {
76
+ const parent = this.ctx.get("agents")?.get(request.parentSessionId);
77
+ if (parent === undefined || !this.authority.isManaged(parent))
78
+ return super.prompt(request, callerSignal);
79
+ let signal = callerSignal;
80
+ try {
81
+ const ticket = this.authority.acquireParentTicket(parent);
82
+ signal = AbortSignal.any([callerSignal, ticket.signal, this.authority.acquireBrowserSignal(this.ctx)]);
83
+ const evidence = await this.authority.resolveChildEvidence(ticket, request.childSessionId, signal);
84
+ this.authority.assertDelivery(ticket, request.childSessionId, evidence);
85
+ signal.throwIfAborted();
86
+ }
87
+ catch (error) {
88
+ // Match the native public prompt error boundary, without relabeling success.
89
+ if (signal.aborted)
90
+ throw new RemoteError("gateway/cancelled", "Subagent prompt was cancelled.", {}, { cause: error });
91
+ if (error instanceof SubagentError && error.code === "UNAUTHORIZED") {
92
+ throw new RemoteError("subagent/unauthorized", "Subagent delivery was not authorized.", { childSessionId: request.childSessionId }, { cause: error });
93
+ }
94
+ throw new RemoteError("gateway/internal", "Subagent prompt failed.", {}, { cause: error });
95
+ }
96
+ return super.prompt(request, signal);
97
+ }
98
+ wakeWaiters() {
99
+ for (const waiter of this.waiters)
100
+ waiter.check();
101
+ }
102
+ substrateReady() {
103
+ const typert = this.ctx.get("typert");
104
+ return this.requiredProviders.every((name) => this.getProvider(name) !== undefined)
105
+ && (typert === undefined || typert.local.get("subagents/prompt") !== undefined);
106
+ }
107
+ waitFor(read, callerSignal) {
108
+ const signal = callerSignal === undefined ? this.lifetime.signal : AbortSignal.any([callerSignal, this.lifetime.signal]);
109
+ return new Promise((resolve, reject) => {
110
+ const cleanup = () => { this.waiters.delete(waiter); signal.removeEventListener("abort", check); };
111
+ const check = () => {
112
+ if (signal.aborted) {
113
+ cleanup();
114
+ reject(signal.reason);
115
+ return;
116
+ }
117
+ const value = read();
118
+ if (value !== undefined) {
119
+ cleanup();
120
+ resolve(value);
121
+ }
122
+ };
123
+ const waiter = { check };
124
+ this.waiters.add(waiter);
125
+ signal.addEventListener("abort", check, { once: true });
126
+ check();
127
+ });
128
+ }
129
+ }
130
+ export default DsmmSubagentRuntime;
131
+ //# sourceMappingURL=subagent-runtime.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmm/dsmm",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "DeepSeek Harness deepwork mode bundle for ocmm-style agentic workflows.",
5
5
  "author": "Hugefiver",
6
6
  "license": "LicenseRef-AAAPL",
@@ -26,6 +26,34 @@
26
26
  "main": "./lib/index.js",
27
27
  "types": "./lib/index.d.ts",
28
28
  "exports": {
29
+ "./managed-settings": {
30
+ "types": "./lib/managed-settings.d.ts",
31
+ "default": "./lib/managed-settings.js"
32
+ },
33
+ "./llm-runtime": {
34
+ "types": "./lib/llm-runtime.d.ts",
35
+ "default": "./lib/llm-runtime.js"
36
+ },
37
+ "./permission-bash": {
38
+ "types": "./lib/permission-bash.d.ts",
39
+ "default": "./lib/permission-bash.js"
40
+ },
41
+ "./permission-pwsh": {
42
+ "types": "./lib/permission-pwsh.d.ts",
43
+ "default": "./lib/permission-pwsh.js"
44
+ },
45
+ "./permission-fs": {
46
+ "types": "./lib/permission-fs.d.ts",
47
+ "default": "./lib/permission-fs.js"
48
+ },
49
+ "./permission-fs-search": {
50
+ "types": "./lib/permission-fs-search.d.ts",
51
+ "default": "./lib/permission-fs-search.js"
52
+ },
53
+ "./permission-web": {
54
+ "types": "./lib/permission-web.d.ts",
55
+ "default": "./lib/permission-web.js"
56
+ },
29
57
  ".": {
30
58
  "types": "./lib/index.d.ts",
31
59
  "default": "./lib/index.js"
@@ -38,6 +66,14 @@
38
66
  "types": "./lib/session-persistence.d.ts",
39
67
  "default": "./lib/session-persistence.js"
40
68
  },
69
+ "./subagent-runtime": {
70
+ "types": "./lib/runtime-integration.d.ts",
71
+ "default": "./lib/runtime-integration.js"
72
+ },
73
+ "./legacy-read-host": {
74
+ "types": "./lib/legacy-read-host.d.ts",
75
+ "default": "./lib/legacy-read-host.js"
76
+ },
41
77
  "./client": {
42
78
  "types": "./lib/client/index.d.ts",
43
79
  "default": "./lib/client.js"
@@ -51,14 +87,19 @@
51
87
  "lib/**/*.d.ts",
52
88
  "scripts/repair-session-log.mjs",
53
89
  "scripts/session-repair-native-verifier.mjs",
90
+ "scripts/migrate-cold-profile.mjs",
91
+ "scripts/cold-profile-composition.mjs",
92
+ "scripts/cold-profile-sources.mjs",
54
93
  "locale/*.json",
55
94
  "agent-presets",
56
95
  "docs/agent-presets.md",
57
96
  "docs/compatibility.md",
58
97
  "docs/design.md",
98
+ "docs/deferred-native-approval-risk.md",
59
99
  "docs/lsp.md",
60
100
  "docs/migration-from-ocmm.md",
61
101
  "docs/model-routing.md",
102
+ "docs/native-permissions.md",
62
103
  "docs/profiles.md",
63
104
  "docs/releasing.md",
64
105
  "docs/research",
@@ -83,92 +124,101 @@
83
124
  },
84
125
  "peerDependencies": {
85
126
  "@deepseek-ai/cordis": "~4.0.4",
86
- "@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
87
- "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
127
+ "@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2",
128
+ "@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
129
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
88
130
  "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
89
131
  "@deepseek-ai/dsh-brand": "0.2.0-rc.2",
132
+ "@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
133
+ "@deepseek-ai/dsh-command-compact": "0.2.0-rc.2",
134
+ "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
135
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
90
136
  "@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
91
137
  "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
92
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
138
+ "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
139
+ "@deepseek-ai/dsh-persona": "0.2.0-rc.2",
140
+ "@deepseek-ai/dsh-plan-mode": "0.2.0-rc.2",
93
141
  "@deepseek-ai/dsh-session": "0.2.0-rc.2",
94
142
  "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.2",
95
143
  "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
96
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
97
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
98
- "@deepseek-ai/dsh-plan-mode": "0.2.0-rc.2",
99
- "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
100
- "@deepseek-ai/dsh-command-compact": "0.2.0-rc.2",
101
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
102
- "@deepseek-ai/dsh-tool-ask-user": "0.2.0-rc.2",
103
- "@deepseek-ai/dsh-tool-todo": "0.2.0-rc.2",
104
- "@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
144
+ "@deepseek-ai/dsh-settings": "0.2.0-rc.2",
145
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
105
146
  "@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
147
+ "@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
148
+ "@deepseek-ai/dsh-tool-ask-user": "0.2.0-rc.2",
149
+ "@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
106
150
  "@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
107
151
  "@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
108
- "@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
109
- "@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
110
152
  "@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
111
- "@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
153
+ "@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
112
154
  "@deepseek-ai/dsh-tool-skill": "0.2.0-rc.2",
113
- "@deepseek-ai/dsh-persona": "0.2.0-rc.2",
114
- "@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2"
155
+ "@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
156
+ "@deepseek-ai/dsh-tool-todo": "0.2.0-rc.2",
157
+ "@deepseek-ai/dsh-tool-web": "0.2.0-rc.2",
158
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
159
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
160
+ "@earendil-works/pi-ai": "0.87.1"
115
161
  },
116
162
  "devDependencies": {
117
163
  "@deepseek-ai/cordis": "~4.0.4",
118
- "@deepseek-ai/dsh-api-session-controller": "0.2.0-rc.2",
119
- "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.2",
120
- "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.2",
121
- "@deepseek-ai/dsh-client-ui-model-selection": "0.2.0-rc.2",
122
- "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
123
- "@deepseek-ai/dsh-typert-registry": "0.2.0-rc.2",
164
+ "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
165
+ "@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2",
166
+ "@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
167
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
124
168
  "@deepseek-ai/dsh-api-gateway": "0.2.0-rc.2",
169
+ "@deepseek-ai/dsh-api-session-controller": "0.2.0-rc.2",
170
+ "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
171
+ "@deepseek-ai/dsh-brand": "0.2.0-rc.2",
125
172
  "@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
126
- "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
127
- "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
128
- "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
129
173
  "@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
174
+ "@deepseek-ai/dsh-client-store": "0.2.0-rc.2",
175
+ "@deepseek-ai/dsh-client-ui-conversation": "0.2.0-rc.2",
176
+ "@deepseek-ai/dsh-client-ui-model-selection": "0.2.0-rc.2",
130
177
  "@deepseek-ai/dsh-client-ui-primitives": "0.2.0-rc.2",
178
+ "@deepseek-ai/dsh-client-ui-renderer": "0.2.0-rc.2",
179
+ "@deepseek-ai/dsh-client-ui-session": "0.2.0-rc.2",
131
180
  "@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
132
- "@types/react": "^18.3.27",
133
- "immer": "10.1.1",
134
- "zustand": "4.4.7",
135
- "esbuild": "^0.25.12",
136
- "react": "^18.3.1",
137
- "@deepseek-ai/dsh-attachment": "0.2.0-rc.2",
138
- "@deepseek-ai/dsh-brand": "0.2.0-rc.2",
181
+ "@deepseek-ai/dsh-client-ui-slots": "0.2.0-rc.2",
182
+ "@deepseek-ai/dsh-command-compact": "0.2.0-rc.2",
183
+ "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
184
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
139
185
  "@deepseek-ai/dsh-invariants": "0.2.0-rc.2",
140
186
  "@deepseek-ai/dsh-llm": "0.2.0-rc.2",
141
- "@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
142
- "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.2",
143
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
144
- "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
145
- "@deepseek-ai/dsh-agent": "0.2.0-rc.2",
146
- "@deepseek-ai/dsh-agent-loop": "0.2.0-rc.2",
147
- "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
148
- "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
187
+ "@deepseek-ai/dsh-llm-pi-ai": "0.2.0-rc.2",
188
+ "@deepseek-ai/dsh-persona": "0.2.0-rc.2",
149
189
  "@deepseek-ai/dsh-plan-mode": "0.2.0-rc.2",
150
- "@deepseek-ai/dsh-compaction-basic": "0.2.0-rc.2",
151
- "@deepseek-ai/dsh-command-compact": "0.2.0-rc.2",
152
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
153
- "@deepseek-ai/dsh-tool-ask-user": "0.2.0-rc.2",
154
- "@deepseek-ai/dsh-tool-todo": "0.2.0-rc.2",
155
190
  "@deepseek-ai/dsh-scope": "0.2.0-rc.2",
156
191
  "@deepseek-ai/dsh-session": "0.2.0-rc.2",
192
+ "@deepseek-ai/dsh-session-persistence": "0.2.0-rc.2",
193
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.0-rc.2",
157
194
  "@deepseek-ai/dsh-session-projection": "0.2.0-rc.2",
158
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.0-rc.2",
159
- "@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
195
+ "@deepseek-ai/dsh-settings": "0.2.0-rc.2",
196
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
160
197
  "@deepseek-ai/dsh-subagent": "0.2.0-rc.2",
198
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.0-rc.2",
199
+ "@deepseek-ai/dsh-system-prompt": "0.2.0-rc.2",
200
+ "@deepseek-ai/dsh-timeout": "0.2.0-rc.2",
201
+ "@deepseek-ai/dsh-tool-ask-user": "0.2.0-rc.2",
202
+ "@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
161
203
  "@deepseek-ai/dsh-tool-fs": "0.2.0-rc.2",
162
204
  "@deepseek-ai/dsh-tool-fs-search": "0.2.0-rc.2",
163
- "@deepseek-ai/dsh-tool-bash": "0.2.0-rc.2",
164
- "@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
165
205
  "@deepseek-ai/dsh-tool-jobs": "0.2.0-rc.2",
166
- "@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
206
+ "@deepseek-ai/dsh-tool-pwsh": "0.2.0-rc.2",
167
207
  "@deepseek-ai/dsh-tool-skill": "0.2.0-rc.2",
168
- "@deepseek-ai/dsh-persona": "0.2.0-rc.2",
169
- "@deepseek-ai/dsh-agent-instructions": "0.2.0-rc.2",
208
+ "@deepseek-ai/dsh-tool-subagent": "0.2.0-rc.2",
209
+ "@deepseek-ai/dsh-tool-todo": "0.2.0-rc.2",
210
+ "@deepseek-ai/dsh-tool-web": "0.2.0-rc.2",
211
+ "@deepseek-ai/dsh-tools": "0.2.0-rc.2",
212
+ "@deepseek-ai/dsh-typert-protocol": "0.2.0-rc.2",
213
+ "@deepseek-ai/dsh-typert-registry": "0.2.0-rc.2",
214
+ "@earendil-works/pi-ai": "0.87.1",
170
215
  "@types/node": "^26.0.0",
171
- "typescript": "^6.0.3"
216
+ "@types/react": "^18.3.27",
217
+ "esbuild": "^0.25.12",
218
+ "immer": "10.1.1",
219
+ "react": "^18.3.1",
220
+ "typescript": "^6.0.3",
221
+ "zustand": "4.4.7"
172
222
  },
173
223
  "dsh": {
174
224
  "client": {
@@ -194,7 +244,7 @@
194
244
  "sync:frontend": "node scripts/materialize-frontend.mjs --sync",
195
245
  "typecheck": "tsc -p tsconfig.json --noEmit",
196
246
  "typecheck:test": "pnpm run build && tsc -p tsconfig.test.json --noEmit",
197
- "test": "pnpm run build && node --test --experimental-strip-types test/*.test.ts",
247
+ "test": "pnpm run build && node --test --experimental-strip-types --import ./test/prompt-source-loader.mjs --test-concurrency=1 test/*.test.ts",
198
248
  "smoke:docker:build": "docker build --build-arg DSH_PACKAGE=@deepseek-ai/dsh@0.2.0-rc.2 -f docker/Dockerfile.smoke -t dsmm-dsh-smoke:0.2 ..",
199
249
  "smoke:docker:run": "docker run --rm dsmm-dsh-smoke:0.2",
200
250
  "smoke:docker": "node scripts/docker-smoke.mjs"
@@ -0,0 +1,15 @@
1
+ # Explicit cold-start overlay; never applied by the default bundle patch.
2
+ # The stock name is an identity assertion, not a replacement/rename operation.
3
+ # Keep spawn, fork, model controls and Gateway entries in their existing scope.
4
+ # Copy any explicit stock capacity/depth Config into the new row before restart.
5
+ - id: subagent
6
+ name: '@deepseek-ai/dsh-subagent'
7
+ disabled: true
8
+ - insert:
9
+ - id: dsmm-subagent-runtime
10
+ name: '@dsmm/dsmm/subagent-runtime'
11
+ inject: [agents]
12
+ config: {}
13
+ - id: dsmm
14
+ name: '@dsmm/dsmm'
15
+ inject: [subagents]
@@ -4,7 +4,7 @@ DeepSeek-V41-Flash applies only to the verified deepseek-official/deepseek-flash
4
4
 
5
5
  - Keep work outcome-first and avoid procedural review or approval loops.
6
6
  - Runtime reasoning effort is chosen by the adapter only from the resolved model's advertised efforts. If the catalog advertises no reasoning efforts, leave the request unchanged.
7
- - Auto preserves explicit upstream effort; strict overrides it only with an advertised effort.
7
+ - Ordinary root model and effort stay native-owned; explicit preflighted invocation effort takes precedence. For other eligible child requests, auto preserves explicit upstream effort; strict uses only an advertised effort.
8
8
  - Do not assume max, high, temperature, or another model's capabilities. Do not claim model heterogeneity when all child roles use the same route.
9
9
  - Maintain tool-call continuity required by the provider and never reveal private reasoning.
10
10
 
@@ -6,8 +6,8 @@ DeepSeek V4 Pro calibration is active.
6
6
  - First classify the task and identify the evidence needed.
7
7
  - Use tools before making repository-specific or API-specific claims.
8
8
  - Runtime reasoning effort is enforced by `agent/request`, not this prompt.
9
- - In `auto` calibration, explicit upstream reasoning effort is preserved; `strict` overrides it with computed policy.
10
- - Only adapter-advertised reasoning efforts are emitted; `max` is selected only for configured DW presets.
9
+ - Ordinary root model and effort stay under the native model picker. Explicit preflighted invocation effort takes precedence over calibration.
10
+ - For other eligible child requests, `auto` preserves explicit upstream effort; `strict` uses the configured default only when the adapter advertises a supported effort. If none is advertised, leave the request unchanged.
11
11
  - Keep final answers concise and do not expose private chain-of-thought.
12
12
  - When tool calls are enabled through the provider, preserve the provider-required reasoning/tool-call continuity.
13
13