@dsmm/dsmm 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +26 -40
  2. package/cordis.patch.yml +9 -13
  3. package/docs/agent-presets.md +26 -14
  4. package/docs/compatibility.md +24 -68
  5. package/docs/deferred-native-approval-risk.md +8 -12
  6. package/docs/design.md +25 -254
  7. package/docs/lsp.md +2 -2
  8. package/docs/migration-from-ocmm.md +38 -51
  9. package/docs/model-routing.md +21 -21
  10. package/docs/native-permissions.md +17 -7
  11. package/docs/profiles.md +13 -9
  12. package/docs/releasing.md +25 -311
  13. package/docs/roadmap.md +52 -241
  14. package/docs/runtime-recovery.md +29 -91
  15. package/docs/safety-guards.md +19 -16
  16. package/docs/settings-status.md +23 -11
  17. package/docs/skill-sync.md +17 -17
  18. package/docs/web-fetch-fakeip.md +82 -0
  19. package/lib/child-capture.d.ts +12 -2
  20. package/lib/child-capture.js +22 -5
  21. package/lib/client/ChildPermissions.d.ts +43 -0
  22. package/lib/client/ChildPermissions.js +100 -0
  23. package/lib/client/ChildrenPanel.d.ts +5 -5
  24. package/lib/client/ChildrenPanel.js +6 -18
  25. package/lib/client/DeploymentFields.d.ts +32 -0
  26. package/lib/client/DeploymentFields.js +70 -0
  27. package/lib/client/DeploymentPage.d.ts +21 -6
  28. package/lib/client/DeploymentPage.js +80 -112
  29. package/lib/client/HistoryContinuation.d.ts +7 -0
  30. package/lib/client/HistoryContinuation.js +22 -0
  31. package/lib/client/NativeCommandEntries.d.ts +17 -0
  32. package/lib/client/NativeCommandEntries.js +68 -0
  33. package/lib/client/PermissionPanelEntry.d.ts +8 -0
  34. package/lib/client/PermissionPanelEntry.js +11 -0
  35. package/lib/client/PermissionsPanel.d.ts +3 -1
  36. package/lib/client/PermissionsPanel.js +10 -9
  37. package/lib/client/ProfilesSection.js +8 -6
  38. package/lib/client/RoleAvailability.js +1 -1
  39. package/lib/client/RoleToolView-data.d.ts +35 -0
  40. package/lib/client/RoleToolView-data.js +52 -0
  41. package/lib/client/RoleToolView-locales.d.ts +36 -0
  42. package/lib/client/RoleToolView-locales.js +20 -0
  43. package/lib/client/RoleToolView.d.ts +10 -0
  44. package/lib/client/RoleToolView.js +47 -0
  45. package/lib/client/SessionProfiles.js +51 -24
  46. package/lib/client/TemporaryPermissions.d.ts +21 -0
  47. package/lib/client/TemporaryPermissions.js +94 -0
  48. package/lib/client/children-controller.d.ts +2 -8
  49. package/lib/client/children-controller.js +1 -26
  50. package/lib/client/children-locales.d.ts +27 -52
  51. package/lib/client/children-locales.js +8 -12
  52. package/lib/client/configuration-display.d.ts +5 -0
  53. package/lib/client/configuration-display.js +11 -0
  54. package/lib/client/controller.d.ts +18 -0
  55. package/lib/client/controller.js +118 -28
  56. package/lib/client/deployment-controller.d.ts +13 -1
  57. package/lib/client/deployment-controller.js +84 -24
  58. package/lib/client/deployment-data.d.ts +1 -0
  59. package/lib/client/deployment-data.js +4 -1
  60. package/lib/client/deployment-locales.d.ts +43 -0
  61. package/lib/client/deployment-locales.js +45 -19
  62. package/lib/client/deployment-modules.d.ts +9 -0
  63. package/lib/client/deployment-modules.js +24 -0
  64. package/lib/client/deployment-workspace.d.ts +48 -0
  65. package/lib/client/deployment-workspace.js +123 -0
  66. package/lib/client/history-controller.d.ts +29 -0
  67. package/lib/client/history-controller.js +111 -0
  68. package/lib/client/history-entry.d.ts +11 -0
  69. package/lib/client/history-entry.js +106 -0
  70. package/lib/client/history-locales.d.ts +95 -0
  71. package/lib/client/history-locales.js +41 -0
  72. package/lib/client/index.js +26 -76
  73. package/lib/client/locales.d.ts +13 -0
  74. package/lib/client/locales.js +104 -86
  75. package/lib/client/permission-controller.d.ts +1 -0
  76. package/lib/client/permission-controller.js +3 -2
  77. package/lib/client/permission-locales.d.ts +51 -0
  78. package/lib/client/permission-locales.js +59 -19
  79. package/lib/client/session-labels.js +4 -3
  80. package/lib/client/styles.d.ts +1 -1
  81. package/lib/client/styles.js +9 -8
  82. package/lib/client/temporary-permission-client.d.ts +20 -0
  83. package/lib/client/temporary-permission-client.js +52 -0
  84. package/lib/client/temporary-permission-entry.d.ts +6 -0
  85. package/lib/client/temporary-permission-entry.js +56 -0
  86. package/lib/client.js +5691 -3439
  87. package/lib/commands.js +2 -0
  88. package/lib/config-file-store.d.ts +3 -0
  89. package/lib/config-file-store.js +4 -2
  90. package/lib/config-revision.d.ts +5 -0
  91. package/lib/config-revision.js +11 -0
  92. package/lib/core-permission-authority.js +11 -41
  93. package/lib/deployment-config.d.ts +9 -2
  94. package/lib/deployment-config.js +35 -8
  95. package/lib/deployment-permission-rules.js +19 -7
  96. package/lib/dsh-types.d.ts +1 -1
  97. package/lib/history-candidates.d.ts +30 -0
  98. package/lib/history-candidates.js +176 -0
  99. package/lib/history-codec.d.ts +11 -0
  100. package/lib/history-codec.js +102 -0
  101. package/lib/history-contract.d.ts +44 -0
  102. package/lib/history-contract.js +2 -0
  103. package/lib/history-controller.d.ts +42 -0
  104. package/lib/history-controller.js +329 -0
  105. package/lib/history-policy.d.ts +4 -0
  106. package/lib/history-policy.js +8 -0
  107. package/lib/history-remote.d.ts +28 -0
  108. package/lib/history-remote.js +17 -0
  109. package/lib/history-rpc.d.ts +24 -0
  110. package/lib/history-rpc.js +136 -0
  111. package/lib/history-support.d.ts +15 -0
  112. package/lib/history-support.js +21 -0
  113. package/lib/history-types.d.ts +67 -0
  114. package/lib/history-types.js +2 -0
  115. package/lib/host-llm-startup.js +3 -3
  116. package/lib/host-llm.d.ts +9 -3
  117. package/lib/host-llm.js +48 -8
  118. package/lib/index.d.ts +18 -20
  119. package/lib/index.js +147 -415
  120. package/lib/lifetime.d.ts +4 -0
  121. package/lib/lifetime.js +22 -0
  122. package/lib/live-pi-ai-owner.d.ts +1 -0
  123. package/lib/live-pi-ai-owner.js +8 -4
  124. package/lib/mode.d.ts +3 -2
  125. package/lib/mode.js +28 -41
  126. package/lib/model-routing.d.ts +2 -8
  127. package/lib/model-routing.js +59 -175
  128. package/lib/native-admission.d.ts +77 -0
  129. package/lib/native-admission.js +503 -0
  130. package/lib/native-pi-ai-wire.d.ts +3 -1
  131. package/lib/native-pi-ai-wire.js +47 -13
  132. package/lib/permission-child-control.d.ts +36 -0
  133. package/lib/permission-child-control.js +164 -0
  134. package/lib/permission-control.d.ts +2 -3
  135. package/lib/permission-control.js +7 -0
  136. package/lib/permission-controller.js +2 -2
  137. package/lib/permission-exec-argv.d.ts +32 -0
  138. package/lib/permission-exec-argv.js +171 -0
  139. package/lib/permission-fs-search.js +2 -1
  140. package/lib/permission-fs.js +2 -1
  141. package/lib/permission-native-rules.js +3 -3
  142. package/lib/permission-temporary-files.d.ts +19 -0
  143. package/lib/permission-temporary-files.js +248 -0
  144. package/lib/permission-temporary-grants.d.ts +106 -0
  145. package/lib/permission-temporary-grants.js +198 -0
  146. package/lib/permission-temporary-install.d.ts +25 -0
  147. package/lib/permission-temporary-install.js +86 -0
  148. package/lib/permission-temporary-remote.d.ts +19 -0
  149. package/lib/permission-temporary-remote.js +75 -0
  150. package/lib/permission-temporary-rpc.d.ts +37 -0
  151. package/lib/permission-temporary-rpc.js +154 -0
  152. package/lib/permission-temporary-types.d.ts +47 -0
  153. package/lib/permission-temporary-types.js +2 -0
  154. package/lib/permission-temporary-web.d.ts +11 -0
  155. package/lib/permission-temporary-web.js +154 -0
  156. package/lib/permission-web.js +2 -1
  157. package/lib/preset-registry.js +3 -2
  158. package/lib/preset-skills.d.ts +3 -12
  159. package/lib/preset-skills.js +28 -58
  160. package/lib/profile-diagnostics.d.ts +1 -1
  161. package/lib/profile-diagnostics.js +2 -2
  162. package/lib/profile-remote.js +61 -22
  163. package/lib/profile-rpc.d.ts +4 -3
  164. package/lib/profile-rpc.js +35 -37
  165. package/lib/profile-runtime.d.ts +42 -74
  166. package/lib/profile-runtime.js +314 -617
  167. package/lib/profile-store.d.ts +20 -8
  168. package/lib/profile-store.js +112 -63
  169. package/lib/profile-types.d.ts +19 -4
  170. package/lib/profiles.d.ts +3 -1
  171. package/lib/profiles.js +9 -7
  172. package/lib/prompt-content.d.ts +1 -0
  173. package/lib/prompt-content.js +4 -1
  174. package/lib/prompts.d.ts +2 -12
  175. package/lib/prompts.js +11 -66
  176. package/lib/role-control-remote.d.ts +1 -4
  177. package/lib/role-control-remote.js +8 -36
  178. package/lib/role-control-rpc.d.ts +10 -36
  179. package/lib/role-control-rpc.js +112 -269
  180. package/lib/role-control-types.d.ts +3 -26
  181. package/lib/role-control-types.js +3 -4
  182. package/lib/role-identity.d.ts +5 -0
  183. package/lib/role-identity.js +10 -0
  184. package/lib/role-invocation.d.ts +3 -3
  185. package/lib/role-invocation.js +2 -2
  186. package/lib/role-llm-runtime.js +5 -11
  187. package/lib/role-policy.d.ts +19 -50
  188. package/lib/role-policy.js +136 -508
  189. package/lib/role-providers.d.ts +5 -8
  190. package/lib/role-providers.js +20 -86
  191. package/lib/role-routing.d.ts +1 -3
  192. package/lib/role-routing.js +24 -34
  193. package/lib/role-subagents.d.ts +5 -14
  194. package/lib/role-subagents.js +163 -108
  195. package/lib/runtime-integration.d.ts +5 -78
  196. package/lib/runtime-integration.js +11 -697
  197. package/lib/session-metadata.d.ts +13 -12
  198. package/lib/session-metadata.js +6 -31
  199. package/lib/session-scope.js +2 -1
  200. package/lib/settings.d.ts +5 -18
  201. package/lib/settings.js +19 -43
  202. package/lib/skills.d.ts +1 -0
  203. package/lib/skills.js +5 -1
  204. package/lib/state.d.ts +3 -2
  205. package/lib/state.js +26 -10
  206. package/lib/status.d.ts +1 -9
  207. package/lib/status.js +3 -55
  208. package/lib/web-fetch-address-policy.d.ts +24 -0
  209. package/lib/web-fetch-address-policy.js +189 -0
  210. package/lib/web-fetch-fakeip.d.ts +25 -0
  211. package/lib/web-fetch-fakeip.js +107 -0
  212. package/package.json +124 -106
  213. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-gateway@0.2.1-rc.2.patch +13291 -0
  214. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-api-remotes@0.2.1-rc.2.patch +9133 -0
  215. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-client-ui-approval@0.2.1-rc.2.patch +156 -0
  216. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-subagent@0.2.1-rc.2.patch +3546 -0
  217. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-user-approval@0.2.1-rc.2.patch +431 -0
  218. package/patches/dsh-approval-settlement/@deepseek-ai__dsh-web@0.2.1-rc.2.patch +119 -0
  219. package/patches/dsh-approval-settlement/README.md +41 -0
  220. package/patches/dsh-approval-settlement/metadata.json +10 -0
  221. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-loop@0.2.1-rc.2.patch +383 -0
  222. package/patches/dsh-session-activation/@deepseek-ai__dsh-agent-preset-registry@0.2.1-rc.2.patch +55 -0
  223. package/patches/dsh-session-activation/@deepseek-ai__dsh-api-session-controller@0.2.1-rc.2.patch +16673 -0
  224. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-subagent@0.2.1-rc.2.patch +29 -0
  225. package/patches/dsh-session-activation/@deepseek-ai__dsh-client-ui-workspace@0.2.1-rc.2.patch +196 -0
  226. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence-jsonl@0.2.1-rc.2.patch +35 -0
  227. package/patches/dsh-session-activation/@deepseek-ai__dsh-session-persistence@0.2.1-rc.2.patch +40 -0
  228. package/docs/research/deepseek-v4-pro.md +0 -74
  229. package/docs/research/oh-dsh.md +0 -96
  230. package/lib/agent-registry.d.ts +0 -36
  231. package/lib/agent-registry.js +0 -75
  232. package/lib/child-admission.d.ts +0 -40
  233. package/lib/child-admission.js +0 -151
  234. package/lib/delivery-authority.d.ts +0 -83
  235. package/lib/delivery-authority.js +0 -397
  236. package/lib/native-child-evidence.d.ts +0 -40
  237. package/lib/native-child-evidence.js +0 -104
  238. package/lib/role-runs.d.ts +0 -138
  239. package/lib/role-runs.js +0 -335
  240. package/lib/session-persistence.d.ts +0 -36
  241. package/lib/session-persistence.js +0 -304
  242. package/lib/subagent-runtime.d.ts +0 -57
  243. package/lib/subagent-runtime.js +0 -257
  244. package/prompts/deepseek-flash.md +0 -11
  245. package/prompts/deepseek-v4-pro.md +0 -14
@@ -3,21 +3,21 @@ import { createRequire } from "node:module";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { defineTool } from "@deepseek-ai/dsh-tools";
5
5
  import { SubagentError } from "@deepseek-ai/dsh-subagent";
6
- import { PERSONA_PREFIX_SECTION } from "@deepseek-ai/dsh-persona";
7
6
  import { DSMM_ROLES } from "./roles.js";
7
+ import { registerRoleHarnessIdentity } from "./role-identity.js";
8
8
  import { isDsmmRoleId } from "./roles.js";
9
9
  import { DsmmRolePolicy, roleToolName } from "./role-policy.js";
10
10
  import { roleProviderName } from "./role-providers.js";
11
- import { capturedOriginalRoleInvocation, duringRoleInvocation, invocationAgentOptions, invocationView, resolveRoleInvocation } from "./role-invocation.js";
11
+ import { capturedRoleInvocation, invocationAgentOptions, invocationView, resolveRoleInvocation } from "./role-invocation.js";
12
12
  import { childOwnedSessionEvents } from "./session-scope.js";
13
13
  import { agentForScope, nativeAgentContext, scopeParentOf } from "./native-scope.js";
14
14
  import { roleRouteRuntimeState } from "./role-routing.js";
15
15
  import { modelRouteFromCall } from "./role-llm.js";
16
- import { duringActivationOwnership } from "./agent-registry.js";
16
+ import { buildDsmmAgentGuidance, buildDsmmLocaleGuidance } from "./prompts.js";
17
17
  const hostControls = ["send_message", "interrupt_agent", "exit_plan_mode", "ask_user_question", "todo_write", "job_output", "job_list", "job_kill"];
18
18
  // Agent-owned policy realms survive a bundle reinstall; do not register another
19
19
  // identity prompt/tools layer on the same retained live Agent.
20
- const admittedRealms = new WeakSet();
20
+ const admittedRealms = new WeakMap();
21
21
  const callableDefinitions = new WeakMap();
22
22
  /** Keep native controls on the frozen startup substrate, not desired-save reconciliation. */
23
23
  export async function registerNativeSubagentControls(ctx) {
@@ -37,11 +37,11 @@ export async function registerNativeSubagentControls(ctx) {
37
37
  ctx.logger.warn("DSMM native subagent controls unavailable; continuable control requires the installed host substrate");
38
38
  }
39
39
  }
40
- /** C's same-run holder/live projection can read the actual lock without reapplying defaults. */
40
+ /** Project the captured invocation without reapplying deployment defaults. */
41
41
  export function roleInvocationView(invocation, label, mode, getSettings, child, ids = {}) {
42
42
  return roleInvocationObservation(invocation, label, mode, getSettings, child, ids).view;
43
43
  }
44
- /** Initial preflight/lock is not an observed SDK request; keep E's distinction truthful. */
44
+ /** Distinguish the captured route from an observed native request. */
45
45
  export function roleInvocationObservation(invocation, label, mode, getSettings, child, ids = {}) {
46
46
  const view = invocationView(invocation, label, mode, ids);
47
47
  if (child === undefined)
@@ -75,10 +75,38 @@ function latestOwnRoleRoute(child) {
75
75
  /** Both observations belong to this exact native Agent; no parent/settings/route-lock fallback. */
76
76
  export function roleRouteComparison(child) {
77
77
  const agent = child;
78
- const invocation = capturedOriginalRoleInvocation(agent);
78
+ const invocation = capturedRoleInvocation(agent);
79
79
  return { childId: child.id, initialRoute: invocation === undefined ? { status: "unknown", reason: "missing-invocation-capture" }
80
80
  : { status: "known", source: "invocation-capture", route: Object.freeze({ ...invocation.initialRoute }) }, liveRoute: latestOwnRoleRoute(agent) };
81
81
  }
82
+ function presentationFields(value) {
83
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : undefined;
84
+ }
85
+ function roleTitle(role) {
86
+ return `${role.kind === "category" ? "Category" : "Role"}: ${role.name} (${role.id})`;
87
+ }
88
+ /** Presenters accept streaming/replayed input independently of strict execution validation. */
89
+ function installRolePresenters(definition, entry) {
90
+ const presentCall = args => {
91
+ const fields = presentationFields(args);
92
+ const target = entry.targetParameter === undefined ? entry.targets[0] : fields?.[entry.targetParameter];
93
+ const role = isDsmmRoleId(target) && entry.targets.includes(target) ? DSMM_ROLES.find(row => row.id === target && row.kind === entry.kind) : undefined;
94
+ return { card: "generic", title: role === undefined ? `Requested ${entry.kind}` : `Requested ${roleTitle(role)}`,
95
+ ...(typeof fields?.description === "string" ? { rawInput: fields.description } : {}) };
96
+ };
97
+ // defineTool soft-validates complete args before its own presenter wrappers;
98
+ // the native definition's presenters also serve partial streams and old logs.
99
+ definition.presentCall = presentCall;
100
+ definition.presentResult = (args, result) => {
101
+ const meta = result.isError ? undefined : presentationFields(result.meta);
102
+ const role = meta === undefined ? undefined : DSMM_ROLES.find(row => row.id === meta.role && row.kind === entry.kind);
103
+ if (role !== undefined && typeof meta?.label === "string" && ["normal", "low", "high", "max"].includes(meta.level)
104
+ && (meta.mode === "one-shot" || meta.mode === "continuable") && ["inherited", "primary", "level", "invocation-route"].includes(meta.routeSource)) {
105
+ return { card: "generic", title: `${roleTitle(role)} · ${meta.level}` };
106
+ }
107
+ return { card: "generic", title: presentCall(args).title };
108
+ };
109
+ }
82
110
  /** Shared by runtime registration and the prompt assembler; empty groups have no callable entry. */
83
111
  export function callableRoleInventory(settings, targets) {
84
112
  const admitted = targets.filter(id => id !== "dsmm-orchestrator" && settings.roles[id]);
@@ -103,16 +131,16 @@ export function admittedCallableRoleInventory(agent, settings, policy, tools) {
103
131
  return targets.length === 0 ? [] : [{ ...registered.entry, targets }];
104
132
  });
105
133
  }
106
- function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, roleRuns) {
134
+ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, admission) {
107
135
  const settings = getSettings(agent);
108
136
  const subagents = agentCtx.get("subagents");
109
137
  if (subagents === undefined)
110
138
  throw new Error("DSMM role tools require native subagents");
111
139
  const background = settings.subagents.enableRunInBackground;
112
- const continuable = settings.subagents.backgroundMode === "continuable";
113
140
  const admittedProviders = new Map(entry.targets.map(target => [target, subagents.getProvider(roleProviderName(target))]));
141
+ const incomplete = new Map();
114
142
  const definition = defineTool({
115
- name: entry.name, description: `Delegate a bounded ${entry.kind} task through the native runtime. ${background ? continuable ? "Background continuable is opt-in here; returns a durable child id for native send_message/interrupt_agent. Set run_in_background false to wait." : "Waits by default; explicit background work is owned by native jobs." : "Waits for the child's useful result. Background execution is disabled."}`,
143
+ name: entry.name, description: `Delegate a bounded ${entry.kind} task through native activation. Waits for the useful result by default.${background ? " Set run_in_background to receive an accepted child/message receipt; native completion notifies the parent." : " Background execution is disabled."}`,
116
144
  parameters: { description: { type: "string", required: true }, prompt: { type: "string", required: true },
117
145
  ...(entry.targetParameter === undefined ? {} : { [entry.targetParameter]: { type: "string", enum: entry.targets, required: true } }),
118
146
  level: { type: "string", enum: ["normal", "low", "high", "max"] },
@@ -127,8 +155,16 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ro
127
155
  const route = invocation?.route;
128
156
  const metadata = invocation === undefined ? "" : `${invocation.role} level=${invocation.level}${route === undefined ? "" : ` route=${route.provider}/${route.model}${route.reasoningEffort === undefined ? "" : ` effort=${route.reasoningEffort}`}`}`;
129
157
  return result.kind === "foreground" ? [{ type: "text", text: metadata }, ...result.output ?? []]
130
- : [{ type: "text", text: `${metadata}\n${result.kind === "continuable" ? `started subagent ${result.subagentId}` : `started background subagent job ${result.jobId}`}` }];
158
+ : [{ type: "text", text: `${metadata}\naccepted subagent ${result.subagentId}` }];
131
159
  }, presentationMeta(_args, value) { return typeof value === "object" && value !== null && !Array.isArray(value) ? value.invocation ?? null : null; } },
160
+ finalizeContent(exec, result) {
161
+ const partial = incomplete.get(exec.token);
162
+ incomplete.delete(exec.token);
163
+ if (!partial || !result.isError || !["DSMM_INCOMPLETE", "ABORTED"].includes(result.error.info?.code ?? ""))
164
+ return;
165
+ return [...result.content, { type: "text", text: `Child outcome: ${partial.stopReason}. The following assistant output is partial, not a completed result.` }, ...partial.output,
166
+ ...partial.diagnostic === undefined ? [] : [{ type: "text", text: `Provider diagnostic: ${partial.diagnostic}` }]];
167
+ },
132
168
  async execute(args, exec) {
133
169
  const fields = ["description", "prompt", "level", ...entry.targetParameter === undefined ? [] : [entry.targetParameter],
134
170
  ...settings.subagents.allowRouteOverride ? ["route"] : [], ...background ? ["run_in_background"] : []];
@@ -137,93 +173,91 @@ function registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, ro
137
173
  const parent = exec.agent;
138
174
  if (parent === undefined)
139
175
  throw new SubagentError("DSMM delegation requires a calling Agent", "UNAUTHORIZED");
140
- if (parent !== agent || tools.get(entry.name, parent) === undefined || policy.toolDenial(agent, entry.name, tools) !== undefined)
176
+ if (parent !== agent || tools.get(entry.name, parent) !== definition || policy.toolDenial(agent, entry.name, tools) !== undefined)
141
177
  throw new SubagentError("DSMM tool is not the exact admitted caller definition", "UNAUTHORIZED");
142
178
  const target = entry.targetParameter === undefined ? entry.targets[0] : exec.arguments[entry.targetParameter];
143
179
  if (!isDsmmRoleId(target) || !entry.targets.includes(target) || DSMM_ROLES.find(row => row.id === target).kind !== entry.kind)
144
180
  throw new SubagentError("DSMM target is unknown, cross-kind or not admitted", "UNAUTHORIZED");
145
181
  const role = DSMM_ROLES.find(row => row.id === target);
182
+ const label = `${role.id.slice("dsmm-".length).split("-").map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(" ")}: ${args.description}`;
146
183
  const admitted = policy.assertDelegation(parent, role.id);
147
184
  const current = getSettings(parent);
148
185
  const provider = subagents.getProvider(roleProviderName(role.id));
149
186
  if (provider === undefined || provider !== admittedProviders.get(role.id))
150
187
  throw new SubagentError("DSMM exact admitted role provider is unavailable", "NO_PROVIDER");
151
- const invocation = await resolveRoleInvocation(parent, role.id, current, exec.signal, { ...(args.level === undefined ? {} : { level: args.level }), ...(args.route === undefined ? {} : { route: args.route }) });
152
- const capturedProvider = provider;
153
- const request = { parent, label: args.description, prompt: [{ type: "text", text: args.prompt }],
154
- agentOptions: invocationAgentOptions(invocation), maxDepth: subagents.resolveMaxDepth(current.subagents.maxDepth) };
155
- const assertCurrent = () => {
156
- if (policy.assertDelegation(parent, role.id).epoch !== admitted.epoch)
157
- throw new SubagentError("DSMM parent admission changed before delegation", "UNAUTHORIZED");
158
- if (subagents.getProvider(roleProviderName(role.id)) !== capturedProvider)
159
- throw new SubagentError("DSMM exact provider changed before delegation", "NO_PROVIDER");
160
- };
161
- exec.signal.throwIfAborted();
162
- const requestedBackground = background && (args.run_in_background ?? continuable);
163
- if (requestedBackground && continuable) {
164
- if (provider.prepareContinuable === undefined)
165
- throw new SubagentError("DSMM provider has no prepareContinuable capability", "UNSUPPORTED_CAPABILITY");
188
+ return admission.duringCall(parent, exec.signal, async (signal) => {
189
+ const invocation = await resolveRoleInvocation(parent, role.id, current, signal, { ...(args.level === undefined ? {} : { level: args.level }), ...(args.route === undefined ? {} : { route: args.route }) });
190
+ const capturedProvider = provider;
191
+ const request = { parent, agentPreset: role.id, prompt: [{ type: "text", text: args.prompt }],
192
+ agentOptions: invocationAgentOptions(invocation), maxDepth: subagents.resolveMaxDepth(current.subagents.maxDepth) };
193
+ const assertCurrent = () => {
194
+ if (policy.assertDelegation(parent, role.id).epoch !== admitted.epoch)
195
+ throw new SubagentError("DSMM parent admission changed before delegation", "UNAUTHORIZED");
196
+ if (subagents.getProvider(roleProviderName(role.id)) !== capturedProvider)
197
+ throw new SubagentError("DSMM exact provider changed before delegation", "NO_PROVIDER");
198
+ };
199
+ signal.throwIfAborted();
200
+ const requestedBackground = background && args.run_in_background === true;
166
201
  assertCurrent();
167
- const child = await duringRoleInvocation(agent, invocation, () => policy.duringDelegation(parent, role.id, () => subagents.startActivation({ provider: provider.name, label: args.description,
168
- request, signal: exec.signal, delivery: "parent" }), undefined, request.maxDepth));
169
- return { kind: "continuable", subagentId: child.childId, invocation: { ...invocationView(invocation, args.description, "continuable", { childId: child.childId }) } };
170
- }
171
- assertCurrent();
172
- if (roleRuns === undefined)
173
- throw new SubagentError("DSMM one-shot delegation requires the stable Host role-run registry", "UNSUPPORTED_CAPABILITY");
174
- const admission = getSettings.admission?.(agent);
175
- if (admission === undefined || admission.epoch !== admitted.epoch)
176
- throw new SubagentError("DSMM one-shot capture requires the exact original parent admission", "UNAUTHORIZED");
177
- const jobs = agentCtx.get("jobs");
178
- if (requestedBackground && jobs === undefined)
179
- throw new SubagentError("DSMM background jobs require the native jobs registry/controller", "UNSUPPORTED_CAPABILITY");
180
- let child;
181
- const projection = { ...invocationView(invocation, args.description, "one-shot"), get route() {
182
- return roleInvocationView(invocation, args.description, "one-shot", getSettings, child).route;
202
+ const pending = await admission.reserve(exec, invocation, provider, request.maxDepth);
203
+ let activation;
204
+ let cancellation;
205
+ const cancel = () => { if (activation) {
206
+ cancellation ??= activation.dispose();
207
+ void cancellation.catch(() => { });
183
208
  } };
184
- const holder = roleRuns.registry.start({ parent, owner: roleRuns.owner, sessionId: parent.id, toolCallId: exec.callId,
185
- admissionEpoch: admitted.epoch, capture: Object.freeze({ invocation, admission }), projection, label: args.description, callerAbort: exec.signal, jobs,
186
- async start(signal) {
187
- assertCurrent();
188
- const run = await duringRoleInvocation(agent, invocation, () => policy.duringDelegation(agent, role.id, () => duringActivationOwnership(signal, () => subagents.startActivation({ provider: provider.name, label: args.description, request, signal, delivery: "caller" })), undefined, request.maxDepth, agent => { child = agent; }));
189
- projection.runId = run.childId;
190
- if (child?.id !== undefined)
191
- projection.childId = child.id;
192
- return run;
193
- } });
194
- if (requestedBackground) {
195
209
  try {
196
- const identity = await holder.ready;
197
- const transition = holder.background({ parent, owner: roleRuns.owner, sessionId: parent.id, toolCallId: exec.callId,
198
- runId: identity.runId, expectedAdmissionEpoch: admitted.epoch });
199
- if (transition.status === "starting")
200
- throw new SubagentError("DSMM ready run is not transferable", "UNAUTHORIZED");
210
+ activation = await subagents.startActivation({ childId: pending.childId, provider: provider.name, label, request, signal: pending.signal, delivery: requestedBackground ? "parent" : "caller" });
211
+ admission.track(activation);
212
+ pending.signal.addEventListener("abort", cancel, { once: true });
213
+ if (pending.signal.aborted) {
214
+ cancel();
215
+ await cancellation;
216
+ pending.signal.throwIfAborted();
217
+ }
218
+ const view = invocationView(invocation, args.description, "continuable", { childId: activation.childId });
219
+ if (requestedBackground)
220
+ return { kind: "continuable", subagentId: activation.childId, messageId: activation.messageId ?? null, invocation: { ...view } };
221
+ const result = await activation.result;
222
+ if (result.stopReason !== "completed")
223
+ incomplete.set(exec.token, result);
224
+ if (cancellation)
225
+ await cancellation;
226
+ pending.signal.throwIfAborted();
227
+ if (result.stopReason !== "completed")
228
+ throw new SubagentError(`Role activation ended: ${result.stopReason}`, "DSMM_INCOMPLETE");
229
+ return { kind: "foreground", output: result.output,
230
+ ...(result.structured === undefined ? {} : { structured: result.structured }), invocation: { ...view } };
201
231
  }
202
- catch (error) {
203
- holder.cancel(error);
204
- const [drain] = await Promise.allSettled([holder.drained]);
205
- if (drain.status === "rejected" && drain.reason !== error)
206
- throw new AggregateError([error, drain.reason], "DSMM background handoff was refused and its owned run drain rejected");
207
- throw error;
232
+ finally {
233
+ pending.signal.removeEventListener("abort", cancel);
234
+ await pending.release();
208
235
  }
209
- }
210
- const held = await holder.foreground;
211
- if (held.kind === "background")
212
- projection.jobId = held.jobId;
213
- const { route, ...metadata } = projection;
214
- const view = { ...metadata, ...(route === undefined ? {} : { route: { ...route } }) };
215
- return held.kind === "foreground" ? { kind: held.kind, runId: held.runId, output: held.output, invocation: view }
216
- : { kind: held.kind, runId: held.invocation.runId, jobId: held.jobId, invocation: view };
236
+ });
217
237
  }
218
238
  });
239
+ installRolePresenters(definition, entry);
219
240
  callableDefinitions.set(definition, { entry: Object.freeze({ ...entry, targets: Object.freeze([...entry.targets]) }), providers: admittedProviders });
220
241
  const dispose = tools.register(definition);
221
242
  return () => { callableDefinitions.delete(definition); dispose(); };
222
243
  }
223
244
  /** Published name retained; all native/headless Agents consume one admitted policy. */
224
- export async function registerHeadlessRoleTools(ctx, controller, getSettings, policy = new DsmmRolePolicy(ctx, getSettings, controller), roleRuns) {
245
+ export async function registerHeadlessRoleTools(ctx, controller, getSettings, policy, admission, onlyAgent) {
246
+ const refresh = admittedRealms.get(onlyAgent);
247
+ if (refresh) {
248
+ refresh();
249
+ return;
250
+ }
225
251
  const states = new WeakMap();
226
- const reconcile = async (agent) => {
252
+ const reconcileIdentity = (agent, role = policy.identity(agent).role) => {
253
+ const state = states.get(agent);
254
+ if (state === undefined || state.identityRole === role)
255
+ return;
256
+ state.identityPrompt?.();
257
+ state.identityPrompt = role === undefined ? undefined : registerRoleHarnessIdentity(agent, role);
258
+ state.identityRole = role;
259
+ };
260
+ const reconcile = (agent) => {
227
261
  const state = states.get(agent);
228
262
  if (state === undefined)
229
263
  return;
@@ -233,24 +267,44 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
233
267
  if (tools === undefined)
234
268
  throw new Error("DSMM role tools require native guard/restrict services");
235
269
  const settings = getSettings(agent), identity = policy.identity(agent), targets = policy.targets(agent);
236
- const personaRole = identity.child ? identity.role : undefined;
237
- if (state.personaRole !== personaRole) {
238
- state.persona?.();
239
- const prompt = agentCtx.get("systemPrompt");
240
- state.persona = personaRole === undefined ? undefined : prompt.section({ name: PERSONA_PREFIX_SECTION,
241
- order: prompt.getSectionOrder("DEPLOYMENT_PERSONA_PREFIX"), text: DSMM_ROLES.find(role => role.id === personaRole).persona });
242
- state.personaRole = personaRole;
270
+ const prompt = agentCtx.get("agentPresets")?.serviceFor(agent, "systemPrompt") ?? agentCtx.get("systemPrompt");
271
+ const promptRealm = Reflect.get(prompt, symbols.original) ?? prompt;
272
+ if (state.promptRealm !== promptRealm) {
273
+ state.guidance?.();
274
+ state.identityPrompt?.();
275
+ state.identityRole = undefined;
276
+ state.guidance = getTraceable(agentCtx, prompt).section({ name: "dsmm:delegation-identity", order: 49, text(context) {
277
+ if (context.scope !== agent && agentForScope(ctx, context.scope) !== agent)
278
+ return "";
279
+ const identity = policy.identity(agent), tools = states.get(agent)?.tools, settings = getSettings(agent);
280
+ if (identity.role === undefined)
281
+ return settings.locale === undefined ? "" : buildDsmmLocaleGuidance(settings);
282
+ const captured = capturedRoleInvocation(agent);
283
+ return buildDsmmAgentGuidance(settings, { scope: identity.child ? "child" : "root", tools: tools?.schemas(agent) ?? [],
284
+ delegation: tools === undefined ? [] : admittedCallableRoleInventory(agent, settings, policy, tools),
285
+ ...(captured === undefined ? {} : { invocation: roleInvocationObservation(captured, DSMM_ROLES.find(role => role.id === captured.target).name, "continuable", getSettings, agent, { childId: agent.id }) }),
286
+ runtimeAdmission: getSettings.subagentRuntime?.(), capabilities: { continuable: true, nativeChildDelivery: true,
287
+ ...(agentCtx.get("dsmmChildren") === undefined ? {} : { nativeBrowserPrompt: { surface: "conversation.dsmm-children" } }) } });
288
+ } });
289
+ state.promptRealm = promptRealm;
243
290
  }
291
+ reconcileIdentity(agent, identity.role);
244
292
  const subagents = agentCtx.get("subagents");
245
293
  const host = ctx.get?.("tools");
246
294
  const names = [...hostControls, ...host?.schemas().map((row) => row.name).filter((name) => name.startsWith(`mcp__${settings.lsp.serverName}__`)) ?? []];
247
295
  const definitions = names.map((name) => host?.get(name));
296
+ const providers = targets.map(role => {
297
+ const provider = subagents?.getProvider(roleProviderName(role));
298
+ return provider === undefined ? undefined : Reflect.get(provider, symbols.original) ?? provider;
299
+ });
300
+ const sameProviders = providers.length === state.providers.length && providers.every((provider, index) => provider === state.providers[index]);
248
301
  const signature = JSON.stringify([identity.role, targets, settings.subagents, targets.map((role) => [settings.roleRouting[role], subagents?.getProvider(roleProviderName(role))?.capabilities])]);
249
302
  const sameRealm = state.tools !== undefined && (Reflect.get(state.tools, symbols.original) ?? state.tools) === (Reflect.get(tools, symbols.original) ?? tools);
250
303
  const parentScope = scopeParentOf(agent);
251
304
  const sameParent = state.parentScope === parentScope;
252
- if (sameRealm && sameParent && signature === state.signature && definitions.length === state.hostDefinitions.length && definitions.every((definition, i) => definition === state.hostDefinitions[i]))
305
+ if (sameRealm && sameParent && sameProviders && signature === state.signature && definitions.length === state.hostDefinitions.length && definitions.every((definition, i) => definition === state.hostDefinitions[i]))
253
306
  return;
307
+ state.signature = undefined;
254
308
  for (const dispose of state.owned.splice(0))
255
309
  dispose();
256
310
  state.restriction?.();
@@ -271,48 +325,49 @@ export async function registerHeadlessRoleTools(ctx, controller, getSettings, po
271
325
  }
272
326
  const inventory = callableRoleInventory(settings, targets.filter(role => subagents?.getProvider(roleProviderName(role))?.capabilities.depthLimit === true));
273
327
  for (const entry of inventory)
274
- state.owned.push(registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, roleRuns));
328
+ state.owned.push(registerRoleTool(agent, agentCtx, tools, entry, getSettings, policy, admission));
275
329
  policy.captureTools(agent, tools, [...inventory.map(entry => entry.name), ...names], !sameRealm || !sameParent);
276
330
  state.signature = signature;
331
+ state.providers = providers;
277
332
  state.hostDefinitions = definitions;
278
333
  state.parentScope = parentScope;
279
334
  };
280
- const onCreated = async ({ agent }) => {
335
+ const onCreated = ({ agent }) => {
281
336
  if (states.has(agent) || admittedRealms.has(agent))
282
337
  return;
283
338
  if (!getSettings(agent).modules.deepwork.enabled)
284
339
  return;
285
340
  const agentCtx = nativeAgentContext(agent);
286
341
  policy.admit(agent);
287
- states.set(agent, { owned: [], hostDefinitions: [] });
288
- policy.installDrain(agent);
289
- agentCtx.get("systemPrompt").section({ name: "dsmm:delegation-identity", order: 49, text() {
290
- const identity = policy.identity(agent);
291
- const tools = states.get(agent)?.tools;
292
- const inventory = tools === undefined ? [] : admittedCallableRoleInventory(agent, getSettings(agent), policy, tools);
293
- return identity.role === undefined ? "" : `Native admitted role: ${identity.role}; ${identity.child ? "bounded child, not stage-owner" : "root"}. Admitted callable delegation: ${inventory.map(entry => `${entry.name}${entry.targetParameter === undefined ? "" : ` (${entry.targetParameter}: ${entry.targets.join(", ")})`}`).join("; ") || "none"}. level defaults to normal; low/high/max require this target's configured level. route is only available with admitted deployment opt-in. Role/host permissions remain in force when common is off. Read-only plans are complete Markdown for native review and authorized coordinator persistence, never planner writes.`;
294
- } });
295
- agentCtx.effect(() => () => {
342
+ states.set(agent, { owned: [], hostDefinitions: [], providers: [] });
343
+ const retire = () => {
344
+ stopIdentity();
296
345
  const state = states.get(agent);
297
346
  state?.restriction?.();
298
347
  state?.guard?.();
299
- state?.persona?.();
348
+ state?.identityPrompt?.();
349
+ state?.guidance?.();
300
350
  for (const dispose of state?.owned ?? [])
301
351
  dispose();
302
352
  states.delete(agent);
303
- });
304
- await reconcile(agent);
305
- admittedRealms.add(agent);
306
- agentCtx.effect(() => () => admittedRealms.delete(agent));
353
+ admittedRealms.delete(agent);
354
+ admission.lifetime.signal.removeEventListener("abort", retire);
355
+ };
356
+ admission.lifetime.signal.addEventListener("abort", retire, { once: true });
357
+ agentCtx.effect(() => retire);
358
+ try {
359
+ reconcile(agent);
360
+ }
361
+ catch (error) {
362
+ retire();
363
+ throw error;
364
+ }
365
+ admittedRealms.set(agent, () => reconcile(agent));
307
366
  };
308
- ctx.on?.("agent/created", onCreated, { global: true });
309
- ctx.on?.("system-prompt/assemble", async (_assembly, options, next) => {
310
- const agent = agentForScope(ctx, options.scope);
311
- if (agent !== undefined)
312
- await reconcile(agent);
313
- return next();
314
- }, { prepend: true, global: true });
315
- for (const agent of ctx.get?.("agents")?.list() ?? [])
316
- await onCreated({ agent });
367
+ // Native assembly collects sections before its waterfall. Admission/mode/preset
368
+ // changes must update the Agent layer before that collection begins.
369
+ const stopIdentity = controller.watch(agent => { if (agent === onlyAgent)
370
+ reconcile(agent); });
371
+ onCreated({ agent: onlyAgent });
317
372
  }
318
373
  //# sourceMappingURL=role-subagents.js.map
@@ -1,81 +1,8 @@
1
- import { Context } from "@deepseek-ai/cordis";
2
- import type { Agent, AgentRegistry } from "@deepseek-ai/dsh-agent";
3
- import { SessionId } from "@deepseek-ai/dsh-session";
4
- import { SubagentRuntime } from "@deepseek-ai/dsh-subagent";
5
- import type { ChildAdmissionCompletion } from "./child-admission-contract.js";
6
- import type { ChildAdmissionEvidence } from "./child-capture.js";
7
- import type { DshAgent, DshContext } from "./dsh-types.js";
8
- import type { DsmmProfileRuntime } from "./profile-runtime.js";
9
- import type { DsmmInvocationView, SubagentRuntimeAdmissionView } from "./profile-types.js";
10
- import type { DsmmRolePolicy } from "./role-policy.js";
11
- import { RoleRunRegistry } from "./role-runs.js";
12
- import type { DsmmRoleRunCapture } from "./role-subagents.js";
13
- import type { DsmmProfileAdmission, DsmmSettings, DsmmSettingsGetter } from "./settings.js";
14
- import { DsmmSubagentRuntime } from "./subagent-runtime.js";
15
- /** An unestablished child is never a native-identity proof for delivery or resumed work. */
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { Agent } from "@deepseek-ai/dsh-agent";
3
+ import type { SubagentRuntimeAdmissionView } from "./profile-types.js";
4
+ export type DsmmHostStartupOptions = Readonly<Record<string, never>>;
5
+ export declare function assertSupportedHostStartup(options: DsmmHostStartupOptions): void;
16
6
  export declare function classifyDsmmAgent(agent: Agent): "dsmm" | "native";
17
- /** Limit DSMM's observers/guards to its own children without altering the native service or factories. */
18
- export declare function managedAgentContext(ctx: Context, controlledParent: (agent: DshAgent) => boolean): DshContext;
19
- /** Enrollment consumes A's completed admissions while native creation retains its original serial owner. */
20
- export declare function admittedAgentContext(ctx: DshContext, runtime: DsmmProfileRuntime): DshContext;
21
7
  export declare function runtimeAdmissionView(ctx: Context): SubagentRuntimeAdmissionView;
22
- /** Capability projection only. Admission objects and A's CAS/maintenance methods remain untouched. */
23
- export declare function publicProfileRuntime(runtime: DsmmProfileRuntime, ctx: Context): DsmmProfileRuntime;
24
- /** No optional compatibility composition is supported by the current Host. */
25
- export type DsmmHostStartupOptions = Readonly<Record<string, never>>;
26
- export declare function assertSupportedHostStartup(startup: DsmmHostStartupOptions): void;
27
- interface NativeDeliveryEvidence {
28
- readonly parent: Agent;
29
- readonly childId: SessionId;
30
- readonly registry: AgentRegistry;
31
- readonly resident: Agent | undefined;
32
- readonly residency: object;
33
- readonly provider: string;
34
- readonly mode: "continuable" | "one-shot";
35
- }
36
- export declare function integrateSubagentRuntime(ctx: Context, settings: DsmmSettings, policy: DsmmRolePolicy, getRuntime: () => DsmmProfileRuntime | undefined, startup?: DsmmHostStartupOptions): Promise<{
37
- bridge: {
38
- authority: import("./child-admission-contract.js").DsmmChildAdmissionAuthority;
39
- policy: import("./delivery-authority.js").DeliveryPolicyBinding<DsmmProfileAdmission, ChildAdmissionEvidence>;
40
- childAdmission: ChildAdmissionCompletion;
41
- readLegacy: import("./child-admission-contract.js").LegacyChildEvidenceReader;
42
- resolveOriginalEvidence: (ticket: import("./child-admission-contract.js").ParentAdmissionTicket, id: string, signal: AbortSignal) => Promise<ChildAdmissionEvidence>;
43
- bind(scope: Context): () => void;
44
- onAdmissionGuardsInstalled(): void;
45
- revokeBeforeDispose(parent: DshAgent, dispose: () => void | Promise<void>): Promise<void>;
46
- };
47
- owner: object;
48
- registry: RoleRunRegistry<DsmmRoleRunCapture, DsmmInvocationView>;
49
- runtime: DsmmSubagentRuntime<DsmmProfileAdmission, ChildAdmissionEvidence | NativeDeliveryEvidence>;
50
- admitLlmRequest(agent: Agent, signal: AbortSignal): Promise<import("./host-llm.js").DsmmLlmAdmission | undefined>;
51
- dispose(nativeDrain: () => Promise<void>): Promise<void>;
52
- onAdmissionGuardsInstalled(): void;
53
- continueStartup(complete: (signal: AbortSignal) => Promise<void>, callerSignal?: AbortSignal): Promise<void>;
54
- ready(): Promise<void>;
55
- revokeBeforeDispose(agent: Agent, dispose: () => void | Promise<void>): Promise<void>;
56
- registerControls(scope: Context): void;
57
- } | undefined>;
58
- export declare function registerRuntimeGuidance(ctx: DshContext, getSettings: DsmmSettingsGetter, policy: DsmmRolePolicy): void;
59
- export declare function registerRoleControlContribution(ctx: Context): void;
60
- export type DsmmHostRuntimeIntegration = NonNullable<Awaited<ReturnType<typeof integrateSubagentRuntime>>>;
61
- declare module "@deepseek-ai/cordis" {
62
- interface Context {
63
- dsmmRuntimeIntegration: DsmmHostRuntimeIntegration;
64
- }
65
- }
66
- /** Explicit startup entry; it owns one PUBLIC subclass, never a live replacement. */
67
- export declare const subagentRuntimePlugin: {
68
- name: string;
69
- inject: string[];
70
- Config: import("@deepseek-ai/schemastery").default<Schemastery.ObjectS<NoInfer<{
71
- maxDepth: import("@deepseek-ai/schemastery").default<number, number, "volatile-defined">;
72
- maxActiveSubagents: import("@deepseek-ai/schemastery").default<number, number, "volatile-defined">;
73
- }>>, Schemastery.ObjectT<NoInfer<{
74
- maxDepth: import("@deepseek-ai/schemastery").default<number, number, "volatile-defined">;
75
- maxActiveSubagents: import("@deepseek-ai/schemastery").default<number, number, "volatile-defined">;
76
- }>>, "plain">;
77
- apply(ctx: Context, config: ConstructorParameters<typeof SubagentRuntime>[1]): void;
78
- };
79
- export * from "./subagent-runtime.js";
80
- export default subagentRuntimePlugin;
81
8
  //# sourceMappingURL=runtime-integration.d.ts.map