dsh-plugin-subagent-director 0.5.1 → 0.5.3
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/CHANGELOG.md +91 -0
- package/README.md +3 -3
- package/lib/bridge-contract.d.ts +7 -0
- package/lib/bridge-contract.d.ts.map +1 -1
- package/lib/client/SubagentOptionsSection.d.ts +1 -5
- package/lib/client/SubagentOptionsSection.d.ts.map +1 -1
- package/lib/client/SubagentOptionsSection.js +10 -19
- package/lib/client/SubagentOptionsSection.js.map +1 -1
- package/lib/client/index.js +5 -18
- package/lib/client/subagent-model.js +1 -1
- package/lib/client/subagent-model.js.map +1 -1
- package/lib/config.d.ts +84 -15
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +15 -2
- package/lib/config.js.map +1 -1
- package/lib/delegation-tool.d.ts +6 -4
- package/lib/delegation-tool.d.ts.map +1 -1
- package/lib/delegation-tool.js +8 -13
- package/lib/delegation-tool.js.map +1 -1
- package/lib/guidance.d.ts +1 -1
- package/lib/guidance.d.ts.map +1 -1
- package/lib/guidance.js +8 -0
- package/lib/guidance.js.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -8
- package/lib/index.js.map +1 -1
- package/lib/remote.d.ts +22 -11
- package/lib/remote.d.ts.map +1 -1
- package/lib/remote.js +35 -26
- package/lib/remote.js.map +1 -1
- package/lib/settings.d.ts +247 -135
- package/lib/settings.d.ts.map +1 -1
- package/lib/settings.js +179 -78
- package/lib/settings.js.map +1 -1
- package/package.json +59 -52
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
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
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
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
/**
|
|
49
|
-
|
|
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
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
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
|
-
*
|
|
127
|
-
*
|
|
216
|
+
* Register the plugin instance's settings page policy (DSH 0.1.7
|
|
217
|
+
* `SettingsForms.configure`).
|
|
128
218
|
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
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 -
|
|
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
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
package/lib/settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAIzC,qFAAqF;AACrF,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAA4B,CAAC;AAEjF;;;GAGG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,mCAA4C,CAAC;AAI/F,+EAA+E;AAC/E,MAAM,CAAC,MAAM,UAAU,GAAG,4BAA4B,CAAC;AAEvD,wEAAwE;AACxE,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB;oEACoE;AACpE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;IACrD,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;IACrD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC;IACvC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE;IAC3B,0EAA0E;IAC1E,wEAAwE;IACxE,sEAAsE;IACtE,uEAAuE;IACvE,0EAA0E;IAC1E,qCAAqC;IACrC,UAAU,EAAE,CAAC;SACV,MAAM,CAAC;QACN,KAAK,EAAE,CAAC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AK,SAAS,EAAE,CAAC;QAC3E,MAAM,IAAI,KAAK,CACb,kCAAkC,GAAG,KAAK,CAAC,WAAW,GAAG,qCAAqC,CAC/F,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,wEAAwE,CAAC,CAAC;IAC5F,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACtD,GAAG,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE;QACjC,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC;AAOD;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,QAAuC,EAAE,EAAU;IACpF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC7C,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,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.
|
|
3
|
+
"version": "0.5.3",
|
|
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",
|
|
@@ -56,7 +56,9 @@
|
|
|
56
56
|
"dshReleases": {
|
|
57
57
|
"0.1.5-rc.1": "compatible",
|
|
58
58
|
"0.1.5-rc.2": "compatible",
|
|
59
|
-
"0.1.6-alpha.2": "compatible"
|
|
59
|
+
"0.1.6-alpha.2": "compatible",
|
|
60
|
+
"0.1.7-rc.1": "compatible",
|
|
61
|
+
"0.1.7-rc.2": "compatible"
|
|
60
62
|
},
|
|
61
63
|
"node": ">=20"
|
|
62
64
|
}
|
|
@@ -78,54 +80,59 @@
|
|
|
78
80
|
},
|
|
79
81
|
"license": "MIT",
|
|
80
82
|
"peerDependencies": {
|
|
81
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
82
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
83
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.
|
|
84
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
85
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.
|
|
86
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.
|
|
87
|
-
"@deepseek-ai/dsh-client-store": "^0.1.
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.1.
|
|
89
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
90
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.
|
|
91
|
-
"@deepseek-ai/dsh-client-ui-session": "^0.1.
|
|
92
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.
|
|
93
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
83
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
84
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-rc.1",
|
|
85
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
|
|
86
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.7-rc.1",
|
|
87
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.1",
|
|
88
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
|
|
89
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-rc.1",
|
|
90
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.1",
|
|
91
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.1",
|
|
92
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1",
|
|
93
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.1",
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1",
|
|
95
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
|
|
94
96
|
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
95
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
96
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
97
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
98
|
-
"@deepseek-ai/dsh-settings": "^0.1.
|
|
99
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
100
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.
|
|
101
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
97
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
|
|
98
|
+
"@deepseek-ai/dsh-session": "^0.1.7-rc.1",
|
|
99
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-rc.1",
|
|
100
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
101
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-rc.1",
|
|
102
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.7-rc.1",
|
|
103
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
|
|
102
104
|
"react": "^18.2.0"
|
|
103
105
|
},
|
|
104
106
|
"devDependencies": {
|
|
105
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
106
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
107
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.
|
|
108
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.
|
|
109
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.
|
|
110
|
-
"@deepseek-ai/dsh-client-locale": "^0.1.
|
|
111
|
-
"@deepseek-ai/dsh-client-store": "^0.1.
|
|
112
|
-
"@deepseek-ai/dsh-client-ui-chat": "^0.1.
|
|
113
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.
|
|
114
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.
|
|
115
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.
|
|
116
|
-
"@deepseek-ai/dsh-client-ui-session": "^0.1.
|
|
117
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.
|
|
118
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.
|
|
107
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
108
|
+
"@deepseek-ai/dsh-agent": "^0.1.7-rc.1",
|
|
109
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.7-rc.1",
|
|
110
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.7-rc.1",
|
|
111
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.7-rc.1",
|
|
112
|
+
"@deepseek-ai/dsh-client-locale": "^0.1.7-rc.1",
|
|
113
|
+
"@deepseek-ai/dsh-client-store": "^0.1.7-rc.1",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-chat": "^0.1.7-rc.1",
|
|
115
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.1.7-rc.1",
|
|
116
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.7-rc.1",
|
|
117
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.7-rc.1",
|
|
118
|
+
"@deepseek-ai/dsh-client-ui-session": "^0.1.7-rc.1",
|
|
119
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.7-rc.1",
|
|
120
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.7-rc.1",
|
|
119
121
|
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
120
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
121
|
-
"@deepseek-ai/dsh-scope": "^0.1.
|
|
122
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
123
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
124
|
-
"@deepseek-ai/dsh-settings": "^0.1.
|
|
125
|
-
"@deepseek-ai/dsh-subagent": "^0.1.
|
|
126
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.
|
|
127
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
128
|
-
"@deepseek-ai/dsh-util-values": "^0.1.
|
|
122
|
+
"@deepseek-ai/dsh-llm": "^0.1.7-rc.1",
|
|
123
|
+
"@deepseek-ai/dsh-scope": "^0.1.7-rc.1",
|
|
124
|
+
"@deepseek-ai/dsh-session": "^0.1.7-rc.1",
|
|
125
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.7-rc.1",
|
|
126
|
+
"@deepseek-ai/dsh-settings": "^0.1.7-rc.1",
|
|
127
|
+
"@deepseek-ai/dsh-subagent": "^0.1.7-rc.1",
|
|
128
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.7-rc.1",
|
|
129
|
+
"@deepseek-ai/dsh-tools": "^0.1.7-rc.1",
|
|
130
|
+
"@deepseek-ai/dsh-util-values": "^0.1.7-rc.1",
|
|
131
|
+
"@deepseek-ai/dsh-invariants": "^0.1.7-rc.1",
|
|
132
|
+
"@deepseek-ai/dsh-ptc-runtime": "^0.1.7-rc.1",
|
|
133
|
+
"@deepseek-ai/dsh-sandbox": "^0.1.7-rc.1",
|
|
134
|
+
"@deepseek-ai/dsh-sandbox-policy": "^0.1.7-rc.1",
|
|
135
|
+
"@deepseek-ai/dsh-user-approval": "^0.1.7-rc.1",
|
|
129
136
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
130
137
|
"@types/node": "^26.2.0",
|
|
131
138
|
"@types/react": "^18.3.1",
|
|
@@ -136,16 +143,16 @@
|
|
|
136
143
|
"typescript": "^7.0.2",
|
|
137
144
|
"use-sync-external-store": "^1.2.0",
|
|
138
145
|
"vitest": "^4.1.10",
|
|
139
|
-
"@deepseek-ai/dsh-util-time": "^0.1.
|
|
140
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.1.
|
|
141
|
-
"@deepseek-ai/dsh-attachment": "^0.1.
|
|
142
|
-
"@deepseek-ai/dsh-brand": "^0.1.
|
|
146
|
+
"@deepseek-ai/dsh-util-time": "^0.1.7-rc.1",
|
|
147
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.1.7-rc.1",
|
|
148
|
+
"@deepseek-ai/dsh-attachment": "^0.1.7-rc.1",
|
|
149
|
+
"@deepseek-ai/dsh-brand": "^0.1.7-rc.1",
|
|
143
150
|
"zustand": "~4.4.7",
|
|
144
151
|
"immer": "^10.1.1"
|
|
145
152
|
},
|
|
146
153
|
"overrides": {
|
|
147
|
-
"@deepseek-ai/dsh-agent-presets": "^0.1.
|
|
148
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
149
|
-
"@deepseek-ai/dsh-cordis-host-runner": "^0.1.
|
|
154
|
+
"@deepseek-ai/dsh-agent-presets": "^0.1.7-rc.1",
|
|
155
|
+
"@deepseek-ai/dsh-invariants": "^0.1.7-rc.1",
|
|
156
|
+
"@deepseek-ai/dsh-cordis-host-runner": "^0.1.7-rc.1"
|
|
150
157
|
}
|
|
151
158
|
}
|