dsh-plugin-subagent-director 0.5.0 → 0.5.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/settings.js CHANGED
@@ -2,56 +2,54 @@
2
2
  * Settings namespace, schema, and write-time validation for Subagent Director
3
3
  * (design section 5.2).
4
4
  *
5
- * This module owns the "subagent-director" settings namespace. It re-exports
6
- * the role/settings types from ./route-resolver (single source of truth) and
7
- * registers them with the canonical optional-settings consumer wiring so a
8
- * deployment without a settings provider keeps working off its composition
9
- * config (zero intrusion).
5
+ * This module owns the "subagent-director" settings surface. On DSH 0.1.7 the
6
+ * settings model changed: dsh-settings' default export is now `SettingsForms`,
7
+ * plugin settings are declared by the plugin's own Cordis Config schema, and the
8
+ * profile plugin entry's config is the single storage layer (there is no
9
+ * settings.yaml override layer). Accordingly:
10
10
  *
11
- * Layering (design 5.2): the schemastery schema stays coercive/permissive
12
- * (all fields optional, roles a string-keyed dict) so an absent section
13
- * resolves cleanly; cross-field / semantic constraints that the schema cannot
14
- * express are enforced at WRITE time by validate(), which throws to refuse the
15
- * write exactly as SettingsRegisterOptions.validate / SettingsSectionHooks.validate
16
- * demand (dsh-settings/lib/types/index.d.ts).
11
+ * - `SettingsFields` is the schemastery field map for the settings surface,
12
+ * with every field `.volatile()` so a settings write updates the running
13
+ * plugin in place without a restart. It is spread into the plugin's Config
14
+ * schema (see ./config.ts) so the entry id `subagent-director` is the ns
15
+ * `describe()` / `mutate()` address.
16
+ * - Cross-field / semantic constraints the schema cannot express are still
17
+ * documented by `validateDirectorSettings`, but the new write path only
18
+ * enforces what the schema declares (per-field shape). See the export comment.
19
+ * The one cross-field reference the schema cannot express — a dangling
20
+ * `defaultRole` — is surfaced at READ time by `readDirectorSettings` /
21
+ * `settingsWarnings` instead (logs + settingsView), restoring the equivalent
22
+ * safety without refusing the write.
23
+ * - `installDirectorSettingsPage` registers the instance page policy
24
+ * (`auto:false`) because the plugin ships its own Web settings page.
17
25
  *
18
- * alpha.4 port: `settingsNamespace()`/`installSettingsSection()` were removed
19
- * from dsh-settings. Namespaces are now plain kebab-case string literals
20
- * (template-literal validated) and registration rides
21
- * `ctx.settings.installSection(owner, ns, schema, entry, hooks)` — the exact
22
- * pattern of the official model-selection-settings.ts consumer.
26
+ * The field map stays permissive where it must be (optional strings, a
27
+ * string-keyed role dict) so an absent section resolves cleanly; per-field
28
+ * semantic requirements the old write validator enforced (non-empty
29
+ * displayName/description, non-blank provider, kebab-case role ids) are now
30
+ * declared in the schema itself and therefore enforced by the settings write
31
+ * path (configEditor validates the Config schema on every write).
23
32
  */
24
33
  import { Context } from '@deepseek-ai/cordis';
25
34
  import z from '@deepseek-ai/schemastery';
26
- import {} from '@deepseek-ai/dsh-settings';
27
35
  /** Settings namespace for Subagent Director (design section 0 naming resolution). */
28
36
  export const SUBAGENT_DIRECTOR_SETTINGS_NAMESPACE = 'subagent-director';
29
- export function createSettingsSnapshot(initial) {
30
- let source;
31
- let snapshot = initial;
32
- return {
33
- hooks: {
34
- setSource: (current) => {
35
- source = current;
36
- snapshot = current();
37
- },
38
- onChange: () => {
39
- if (source !== undefined)
40
- snapshot = source();
41
- },
42
- },
43
- get: () => snapshot,
44
- };
45
- }
37
+ /**
38
+ * The official dsh-tool-subagent settings entry id (also its profile plugin id):
39
+ * the settings ns carrying the authorized subagent model-selection allowlist.
40
+ */
41
+ export const SUBAGENT_MODEL_SELECTION_NAMESPACE = 'subagent-model-selection-settings';
46
42
  /** Kebab-case: lowercase alphanumeric segments separated by single hyphens. */
47
- const KEBAB_CASE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
48
- /** Schemastery schema for one role template. All fields optional so a partial /
49
- * absent role resolves; semantic requirements are enforced by validate(). */
43
+ export const KEBAB_CASE = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
44
+ /** A string that must contain at least one non-whitespace character. */
45
+ const NON_BLANK = /\S/;
46
+ /** Schemastery schema for one role template. displayName/description are
47
+ * required and non-blank; provider (when set) must be non-blank. */
50
48
  export const RoleTemplateSchema = z.object({
51
- displayName: z.string(),
52
- description: z.string(),
49
+ displayName: z.string().required().pattern(NON_BLANK),
50
+ description: z.string().required().pattern(NON_BLANK),
53
51
  persona: z.string(),
54
- provider: z.string(),
52
+ provider: z.string().pattern(NON_BLANK),
55
53
  model: z.string(),
56
54
  reasoningEffort: z.string(),
57
55
  // schemastery has no z.optional/z.undefined; an absent object field would
@@ -68,18 +66,103 @@ export const RoleTemplateSchema = z.object({
68
66
  .default(undefined),
69
67
  });
70
68
  /**
71
- * Schemastery schema for the Subagent Director settings section. Every field is
72
- * optional (schemastery object fields are optional by default); roles is a
73
- * string-keyed dict of RoleTemplateSchema.
69
+ * The settings-surface field map. Every field is `.volatile()`: a settings
70
+ * write merges into the profile entry config and the Cordis loader commits the
71
+ * new values into the running references in place (no plugin restart). Role ids
72
+ * are validated as kebab-case by the dict's key schema.
74
73
  */
75
- export const SettingsSchema = z.object({
76
- defaultProvider: z.string(),
77
- defaultModel: z.string(),
78
- defaultReasoningEffort: z.string(),
79
- defaultRole: z.string(),
80
- fallbackOnInvalid: z.boolean().default(true),
81
- roles: z.dict(RoleTemplateSchema),
82
- });
74
+ export const SettingsFields = {
75
+ defaultProvider: z.string().volatile(),
76
+ defaultModel: z.string().volatile(),
77
+ defaultReasoningEffort: z.string().volatile(),
78
+ defaultRole: z.string().volatile(),
79
+ fallbackOnInvalid: z.boolean().default(true).volatile(),
80
+ roles: z.dict(RoleTemplateSchema, z.string().pattern(KEBAB_CASE)).volatile(),
81
+ };
82
+ /**
83
+ * Schemastery schema for the Subagent Director settings surface on its own
84
+ * (settings fields only, no composition fields). The plugin's shipped Config
85
+ * schema is this map spread over the composition fields — see ./config.ts.
86
+ */
87
+ export const SettingsSchema = z.object(SettingsFields);
88
+ /**
89
+ * Project the live Config handles onto the plain settings snapshot consumed by
90
+ * the resolver/guidance. Mirrors the Host schema in src/settings.ts.
91
+ *
92
+ * Read-time hardening: the only cross-field constraint a schemastery schema
93
+ * cannot express — a `defaultRole` that references no defined role — is checked
94
+ * here and reported through the optional `warnings` collector. On 0.1.7 the
95
+ * settings write path admits such a dangling reference (the schema is the write
96
+ * gate and it is per-field only); surfacing it at read time restores the
97
+ * equivalent safety the old write-time validator gave, without refusing the
98
+ * write. The dangling value itself is returned UNCHANGED — the user's stored
99
+ * configuration must stay as written so the mistake remains correctable.
100
+ *
101
+ * @param config - the resolved Cordis config carrying the volatile handles.
102
+ * @param warnings - optional out-collector; when supplied it receives every
103
+ * read-time warning (see {@link settingsWarnings}). Omitted by callers that
104
+ * only need the snapshot, keeping the no-arg path byte-identical.
105
+ * @returns a detached settings snapshot (fresh object each call).
106
+ */
107
+ export function readDirectorSettings(config, warnings) {
108
+ const settings = {
109
+ defaultProvider: config.defaultProvider.get(),
110
+ defaultModel: config.defaultModel.get(),
111
+ defaultReasoningEffort: config.defaultReasoningEffort.get(),
112
+ defaultRole: config.defaultRole.get(),
113
+ fallbackOnInvalid: config.fallbackOnInvalid.get(),
114
+ // Volatile snapshots are deeply readonly; consumers only read settings, so
115
+ // the cast to the mutable-typed interface is safe.
116
+ roles: config.roles.get(),
117
+ };
118
+ if (warnings !== undefined)
119
+ warnings.push(...settingsWarnings(settings));
120
+ return settings;
121
+ }
122
+ /**
123
+ * Warning for a `defaultRole` that references no defined role, or undefined
124
+ * when the reference is sound (or unset). The cross-field reference the
125
+ * schemastery schema cannot express; pure — reads the snapshot only.
126
+ */
127
+ export function danglingDefaultRoleWarning(settings) {
128
+ const roleId = settings.defaultRole;
129
+ if (isEmpty(roleId))
130
+ return undefined;
131
+ const roles = settings.roles ?? {};
132
+ if (roles[roleId] !== undefined)
133
+ return undefined;
134
+ return ('subagent-director: defaultRole "' + roleId +
135
+ '" does not reference a defined role; its binding (persona/provider/model) is skipped and the default route is used');
136
+ }
137
+ /**
138
+ * Read-time warnings for a resolved settings snapshot. A list (not a single
139
+ * value) so further read-time checks can be added without changing callers.
140
+ * Today the only entry is a dangling `defaultRole`.
141
+ */
142
+ export function settingsWarnings(settings) {
143
+ const warning = danglingDefaultRoleWarning(settings);
144
+ return warning === undefined ? [] : [warning];
145
+ }
146
+ /**
147
+ * Wrap a warn sink in a deduplicating emitter keyed on the warning-set
148
+ * signature, so a persistent misconfiguration warns once per read rather than
149
+ * on every read: an unchanged set is swallowed, an empty set clears the
150
+ * memory (a fixing write stops the noise), and a changed set re-warns.
151
+ *
152
+ * @param emit - receives each warning string that should be logged.
153
+ * @returns a function to call with the warnings of one settings read.
154
+ */
155
+ export function createSettingsWarner(emit) {
156
+ let lastSignature = '';
157
+ return (warnings) => {
158
+ const signature = warnings.join('\n');
159
+ if (signature === lastSignature)
160
+ return;
161
+ lastSignature = signature;
162
+ for (const warning of warnings)
163
+ emit(warning);
164
+ };
165
+ }
83
166
  function isEmpty(value) {
84
167
  return value === undefined || value === null || value.trim().length === 0;
85
168
  }
@@ -88,16 +171,23 @@ function isBlankString(value) {
88
171
  return typeof value === 'string' && value.trim().length === 0;
89
172
  }
90
173
  /**
91
- * Write-time validator for a resolved settings section (design 5.2).
174
+ * Semantic validator for a resolved settings section (design 5.2).
175
+ *
176
+ * On DSH ≤ 0.1.6 this was the settings write-time validator (installSection's
177
+ * `validate` hook): it threw to refuse a write. On 0.1.7 the write path has no
178
+ * custom validate hook — the Config schema is the write gate — so the
179
+ * per-field checks it performed (kebab-case role ids, non-empty
180
+ * displayName/description, non-blank provider) are now declared in
181
+ * {@link RoleTemplateSchema} / {@link SettingsFields} instead.
92
182
  *
93
- * Throws to refuse the write that produced value, as the settings seam
94
- * contract requires. Checks:
95
- * - every role key is kebab-case;
96
- * - every role's displayName and description are present and non-empty;
97
- * - defaultRole, when set, references an existing role key;
98
- * - every explicitly-set provider is a non-empty string.
183
+ * The remaining cross-field check — a `defaultRole` that references no defined
184
+ * role — cannot be expressed in a schemastery schema. It is kept here for
185
+ * callers/tests that want to check it explicitly; the runtime route resolver
186
+ * already tolerates a dangling defaultRole by warning and skipping the binding,
187
+ * so no write is refused for it on 0.1.7.
99
188
  *
100
189
  * @param value - the resolved section, schema-valid by construction.
190
+ * @throws when the cross-field defaultRole reference is dangling.
101
191
  */
102
192
  export function validateDirectorSettings(value) {
103
193
  const roles = value.roles ?? {};
@@ -123,29 +213,40 @@ export function validateDirectorSettings(value) {
123
213
  }
124
214
  }
125
215
  /**
126
- * Install the Subagent Director settings section through the canonical
127
- * optional-settings consumer wiring.
216
+ * Register the plugin instance's settings page policy (DSH 0.1.7
217
+ * `SettingsForms.configure`).
128
218
  *
129
- * alpha.4: registration rides `ctx.settings.installSection(owner, ns, schema,
130
- * entry, hooks)` — the same pattern the official
131
- * subagent-model-selection-settings consumer uses. A deployment with no
132
- * settings service simply never mounts it: this helper guards that explicitly
133
- * for readability and logs a debug line when the service is absent so the
134
- * gradual fall-back to the composition config is observable.
219
+ * The plugin ships its own Web settings page (slot `settings.section`), so
220
+ * `auto:false` disables the Host's auto-generated page for this instance and
221
+ * avoids a duplicate page. The policy is registered into the plugin fiber's
222
+ * effects and removed on unload. `settings` is a required inject for this
223
+ * plugin, so the callback always runs on an active deployment.
135
224
  *
136
- * @param ctx - consumer plugin context owning the wiring (also the fiber that
137
- * installSection ties the registration to).
138
- * @param entry - the consumer's composition-layer config, used as the settings
139
- * base while a provider is absent.
140
- * @param hooks - source sink and change notification (plus optional validate).
225
+ * @param ctx - the plugin fiber's context.
141
226
  */
142
- export function installDirectorSettings(ctx, entry, hooks) {
143
- if (ctx.get('settings') === undefined) {
144
- ctx.logger.debug('[subagent-director] no settings service mounted; using composition config and skipping settings section registration');
145
- return;
227
+ export function installDirectorSettingsPage(ctx) {
228
+ ctx.inject(['settings'], (child) => {
229
+ child.effect(() => child.settings.configure({ auto: false }, ctx.fiber));
230
+ });
231
+ }
232
+ /**
233
+ * Read one namespace's live (redacted) value from the settings seam's
234
+ * `describe()`. On 0.1.7 there is no `settings.get(ns)`; a namespace's live
235
+ * value is the descriptor's `value` projected from the running plugin config.
236
+ *
237
+ * @param settings - the settings service (structural).
238
+ * @param ns - the profile entry id to read.
239
+ * @returns the redacted live value, or undefined when the ns is not active.
240
+ */
241
+ export function readNamespaceValue(settings, ns) {
242
+ if (settings === undefined)
243
+ return undefined;
244
+ try {
245
+ const descriptor = settings.describe({ redactSecrets: true }).find((row) => row.ns === ns);
246
+ return descriptor?.value;
247
+ }
248
+ catch {
249
+ return undefined;
146
250
  }
147
- ctx.settings.installSection(ctx, SUBAGENT_DIRECTOR_SETTINGS_NAMESPACE, SettingsSchema, entry, hooks);
148
251
  }
149
- /** Convenience exported alias used by tests. */
150
- export { SettingsSchema as SubagentDirectorSettingsSchema };
151
252
  //# sourceMappingURL=settings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,CAAC,MAAM,0BAA0B,CAAC;AACzC,OAAO,EAEN,MAAM,2BAA2B,CAAC;AAInC,qFAAqF;AACrF,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAA4B,CAAC;AAqBjF,MAAM,UAAU,sBAAsB,CAAI,OAAU;IAClD,IAAI,MAA6B,CAAC;IAClC,IAAI,QAAQ,GAAG,OAAO,CAAC;IACvB,OAAO;QACL,KAAK,EAAE;YACL,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;gBACrB,MAAM,GAAG,OAAO,CAAC;gBACjB,QAAQ,GAAG,OAAO,EAAE,CAAC;YACvB,CAAC;YACD,QAAQ,EAAE,GAAG,EAAE;gBACb,IAAI,MAAM,KAAK,SAAS;oBAAE,QAAQ,GAAG,MAAM,EAAE,CAAC;YAChD,CAAC;SACF;QACD,GAAG,EAAE,GAAG,EAAE,CAAC,QAAQ;KACpB,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAEhD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AAG,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC3F,OAAO,UAAU,EAAE,KAAK,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-plugin-subagent-director",
3
- "version": "0.5.0",
3
+ "version": "0.5.3-beta.0",
4
4
  "description": "Subagent Director: choose an LLM provider/model for each subagent (call args > role binding > plugin default > inherit parent) and plan main-agent/subagent responsibilities with role templates, plus a settings UI.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -51,6 +51,15 @@
51
51
  "remote"
52
52
  ],
53
53
  "platform": "web"
54
+ },
55
+ "compatibility": {
56
+ "dshReleases": {
57
+ "0.1.5-rc.1": "compatible",
58
+ "0.1.5-rc.2": "compatible",
59
+ "0.1.6-alpha.2": "compatible",
60
+ "0.1.7-rc.1": "compatible"
61
+ },
62
+ "node": ">=20"
54
63
  }
55
64
  },
56
65
  "keywords": [
@@ -70,54 +79,59 @@
70
79
  },
71
80
  "license": "MIT",
72
81
  "peerDependencies": {
73
- "@deepseek-ai/cordis": "^4.0.1",
74
- "@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
75
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4",
76
- "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.4",
77
- "@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.4",
78
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4",
79
- "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.4",
80
- "@deepseek-ai/dsh-client-ui-chat": "^0.1.2-alpha.4",
81
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4",
82
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.4",
83
- "@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.4",
84
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
85
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
82
+ "@deepseek-ai/cordis": "^4.0.4",
83
+ "@deepseek-ai/dsh-agent": "^0.1.7-rc.1",
84
+ "@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
85
+ "@deepseek-ai/dsh-api-remotes": "^0.1.7-rc.1",
86
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.1",
87
+ "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
88
+ "@deepseek-ai/dsh-client-store": "^0.1.7-rc.1",
89
+ "@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.1",
90
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.1",
91
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1",
92
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.1",
93
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1",
94
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
86
95
  "@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
87
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
88
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
89
- "@deepseek-ai/dsh-session-projection": "^0.1.2-alpha.4",
90
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.4",
91
- "@deepseek-ai/dsh-subagent": "^0.1.2-alpha.4",
92
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4",
93
- "@deepseek-ai/dsh-tools": "^0.1.2-alpha.4",
96
+ "@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
97
+ "@deepseek-ai/dsh-session": "^0.1.7-rc.1",
98
+ "@deepseek-ai/dsh-session-projection": "^0.1.7-rc.1",
99
+ "@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
100
+ "@deepseek-ai/dsh-subagent": "^0.1.7-rc.1",
101
+ "@deepseek-ai/dsh-system-prompt": "^0.1.7-rc.1",
102
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
94
103
  "react": "^18.2.0"
95
104
  },
96
105
  "devDependencies": {
97
- "@deepseek-ai/cordis": "^4.0.1",
98
- "@deepseek-ai/dsh-agent": "^0.1.2-alpha.4",
99
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.4",
100
- "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.4",
101
- "@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.4",
102
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.4",
103
- "@deepseek-ai/dsh-client-store": "^0.1.2-alpha.4",
104
- "@deepseek-ai/dsh-client-ui-chat": "^0.1.2-alpha.4",
105
- "@deepseek-ai/dsh-client-ui-conversation": "^0.1.2-alpha.4",
106
- "@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.4",
107
- "@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.4",
108
- "@deepseek-ai/dsh-client-ui-session": "^0.1.2-alpha.4",
109
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.4",
110
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.4",
106
+ "@deepseek-ai/cordis": "^4.0.4",
107
+ "@deepseek-ai/dsh-agent": "^0.1.7-rc.1",
108
+ "@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
109
+ "@deepseek-ai/dsh-api-remotes": "^0.1.7-rc.1",
110
+ "@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.1",
111
+ "@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
112
+ "@deepseek-ai/dsh-client-store": "^0.1.7-rc.1",
113
+ "@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.1",
114
+ "@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.1",
115
+ "@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1",
116
+ "@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1",
117
+ "@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.1",
118
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1",
119
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
111
120
  "@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
112
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
113
- "@deepseek-ai/dsh-scope": "^0.1.2-alpha.4",
114
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
115
- "@deepseek-ai/dsh-session-projection": "^0.1.2-alpha.4",
116
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.4",
117
- "@deepseek-ai/dsh-subagent": "^0.1.2-alpha.4",
118
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.4",
119
- "@deepseek-ai/dsh-tools": "^0.1.2-alpha.4",
120
- "@deepseek-ai/dsh-util-values": "^0.1.2-alpha.4",
121
+ "@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
122
+ "@deepseek-ai/dsh-scope": "^0.1.7-rc.1",
123
+ "@deepseek-ai/dsh-session": "^0.1.7-rc.1",
124
+ "@deepseek-ai/dsh-session-projection": "^0.1.7-rc.1",
125
+ "@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
126
+ "@deepseek-ai/dsh-subagent": "^0.1.7-rc.1",
127
+ "@deepseek-ai/dsh-system-prompt": "^0.1.7-rc.1",
128
+ "@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
129
+ "@deepseek-ai/dsh-util-values": "^0.1.7-rc.1",
130
+ "@deepseek-ai/dsh-invariants": "^0.1.7-rc.1",
131
+ "@deepseek-ai/dsh-ptc-runtime": "^0.1.7-rc.1",
132
+ "@deepseek-ai/dsh-sandbox": "^0.1.7-rc.1",
133
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.7-rc.1",
134
+ "@deepseek-ai/dsh-user-approval": "^0.1.7-rc.1",
121
135
  "@deepseek-ai/schemastery": "^3.18.1",
122
136
  "@types/node": "^26.2.0",
123
137
  "@types/react": "^18.3.1",
@@ -128,9 +142,16 @@
128
142
  "typescript": "^7.0.2",
129
143
  "use-sync-external-store": "^1.2.0",
130
144
  "vitest": "^4.1.10",
131
- "@deepseek-ai/dsh-util-time": "^0.1.2-alpha.4",
132
- "@deepseek-ai/dsh-typert-protocol": "^0.1.2-alpha.4",
133
- "@deepseek-ai/dsh-attachment": "^0.1.2-alpha.4",
134
- "@deepseek-ai/dsh-brand": "^0.1.2-alpha.4"
145
+ "@deepseek-ai/dsh-util-time": "^0.1.7-rc.1",
146
+ "@deepseek-ai/dsh-typert-protocol": "^0.1.7-rc.1",
147
+ "@deepseek-ai/dsh-attachment": "^0.1.7-rc.1",
148
+ "@deepseek-ai/dsh-brand": "^0.1.7-rc.1",
149
+ "zustand": "~4.4.7",
150
+ "immer": "^10.1.1"
151
+ },
152
+ "overrides": {
153
+ "@deepseek-ai/dsh-agent-presets": "^0.1.7-rc.1",
154
+ "@deepseek-ai/dsh-invariants": "^0.1.7-rc.1",
155
+ "@deepseek-ai/dsh-cordis-host-runner": "^0.1.7-rc.1"
135
156
  }
136
157
  }