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.d.ts
CHANGED
|
@@ -2,92 +2,130 @@
|
|
|
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';
|
|
34
|
+
import type { Volatile } from '@deepseek-ai/cordis';
|
|
25
35
|
import z from '@deepseek-ai/schemastery';
|
|
26
|
-
import {
|
|
27
|
-
import type { SubagentDirectorSettings } from './route-resolver.js';
|
|
36
|
+
import type { RoleTemplate, SubagentDirectorSettings } from './route-resolver.js';
|
|
28
37
|
/** Settings namespace for Subagent Director (design section 0 naming resolution). */
|
|
29
38
|
export declare const SUBAGENT_DIRECTOR_SETTINGS_NAMESPACE: 'subagent-director';
|
|
39
|
+
/**
|
|
40
|
+
* The official dsh-tool-subagent settings entry id (also its profile plugin id):
|
|
41
|
+
* the settings ns carrying the authorized subagent model-selection allowlist.
|
|
42
|
+
*/
|
|
43
|
+
export declare const SUBAGENT_MODEL_SELECTION_NAMESPACE: 'subagent-model-selection-settings';
|
|
30
44
|
export type { RoleTemplate, SubagentDirectorSettings } from './route-resolver.js';
|
|
45
|
+
/** Kebab-case: lowercase alphanumeric segments separated by single hyphens. */
|
|
46
|
+
export declare const KEBAB_CASE: RegExp;
|
|
47
|
+
/** Schemastery schema for one role template. displayName/description are
|
|
48
|
+
* required and non-blank; provider (when set) must be non-blank. */
|
|
49
|
+
export declare const RoleTemplateSchema: z<Schemastery.ObjectS<NoInfer<{
|
|
50
|
+
displayName: z<string, string, "defined">;
|
|
51
|
+
description: z<string, string, "defined">;
|
|
52
|
+
persona: z<string, string, "plain">;
|
|
53
|
+
provider: z<string, string, "plain">;
|
|
54
|
+
model: z<string, string, "plain">;
|
|
55
|
+
reasoningEffort: z<string, string, "plain">;
|
|
56
|
+
toolFilter: z<Schemastery.ObjectS<NoInfer<{
|
|
57
|
+
allow: z<string[], string[], "plain">;
|
|
58
|
+
deny: z<string[], string[], "plain">;
|
|
59
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
60
|
+
allow: z<string[], string[], "plain">;
|
|
61
|
+
deny: z<string[], string[], "plain">;
|
|
62
|
+
}>>, "defined">;
|
|
63
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
64
|
+
displayName: z<string, string, "defined">;
|
|
65
|
+
description: z<string, string, "defined">;
|
|
66
|
+
persona: z<string, string, "plain">;
|
|
67
|
+
provider: z<string, string, "plain">;
|
|
68
|
+
model: z<string, string, "plain">;
|
|
69
|
+
reasoningEffort: z<string, string, "plain">;
|
|
70
|
+
toolFilter: z<Schemastery.ObjectS<NoInfer<{
|
|
71
|
+
allow: z<string[], string[], "plain">;
|
|
72
|
+
deny: z<string[], string[], "plain">;
|
|
73
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
74
|
+
allow: z<string[], string[], "plain">;
|
|
75
|
+
deny: z<string[], string[], "plain">;
|
|
76
|
+
}>>, "defined">;
|
|
77
|
+
}>>, "plain">;
|
|
31
78
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* hot reload, settings UI writes). The previous wiring captured the value
|
|
37
|
-
* inside setSource and left onChange empty, so edits were only visible after a
|
|
38
|
-
* restart. This helper keeps the source thunk so onChange can re-read it and
|
|
39
|
-
* the snapshot follows live settings.
|
|
79
|
+
* The settings-surface field map. Every field is `.volatile()`: a settings
|
|
80
|
+
* write merges into the profile entry config and the Cordis loader commits the
|
|
81
|
+
* new values into the running references in place (no plugin restart). Role ids
|
|
82
|
+
* are validated as kebab-case by the dict's key schema.
|
|
40
83
|
*/
|
|
41
|
-
export
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}>, Schemastery.ObjectT<{
|
|
75
|
-
allow: z<string[], string[]>;
|
|
76
|
-
deny: z<string[], string[]>;
|
|
77
|
-
}>>;
|
|
78
|
-
}>>;
|
|
84
|
+
export declare const SettingsFields: {
|
|
85
|
+
defaultProvider: z<string, string, "volatile">;
|
|
86
|
+
defaultModel: z<string, string, "volatile">;
|
|
87
|
+
defaultReasoningEffort: z<string, string, "volatile">;
|
|
88
|
+
defaultRole: z<string, string, "volatile">;
|
|
89
|
+
fallbackOnInvalid: z<boolean, boolean, "volatile-defined">;
|
|
90
|
+
roles: z<NoInfer<import("@deepseek-ai/cosmokit").Dict<{
|
|
91
|
+
displayName?: string | null | undefined;
|
|
92
|
+
description?: string | null | undefined;
|
|
93
|
+
persona?: string | null | undefined;
|
|
94
|
+
provider?: string | null | undefined;
|
|
95
|
+
model?: string | null | undefined;
|
|
96
|
+
reasoningEffort?: string | null | undefined;
|
|
97
|
+
toolFilter?: ({
|
|
98
|
+
allow?: string[] | null | undefined;
|
|
99
|
+
deny?: string[] | null | undefined;
|
|
100
|
+
} & import("@deepseek-ai/cosmokit").Dict) | null | undefined;
|
|
101
|
+
} & import("@deepseek-ai/cosmokit").Dict, string>>, NoInfer<import("@deepseek-ai/cosmokit").Dict<Schemastery.ObjectT<NoInfer<{
|
|
102
|
+
displayName: z<string, string, "defined">;
|
|
103
|
+
description: z<string, string, "defined">;
|
|
104
|
+
persona: z<string, string, "plain">;
|
|
105
|
+
provider: z<string, string, "plain">;
|
|
106
|
+
model: z<string, string, "plain">;
|
|
107
|
+
reasoningEffort: z<string, string, "plain">;
|
|
108
|
+
toolFilter: z<Schemastery.ObjectS<NoInfer<{
|
|
109
|
+
allow: z<string[], string[], "plain">;
|
|
110
|
+
deny: z<string[], string[], "plain">;
|
|
111
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
112
|
+
allow: z<string[], string[], "plain">;
|
|
113
|
+
deny: z<string[], string[], "plain">;
|
|
114
|
+
}>>, "defined">;
|
|
115
|
+
}>>, string>>, "volatile">;
|
|
116
|
+
};
|
|
79
117
|
/**
|
|
80
|
-
* Schemastery schema for the Subagent Director settings
|
|
81
|
-
*
|
|
82
|
-
*
|
|
118
|
+
* Schemastery schema for the Subagent Director settings surface on its own
|
|
119
|
+
* (settings fields only, no composition fields). The plugin's shipped Config
|
|
120
|
+
* schema is this map spread over the composition fields — see ./config.ts.
|
|
83
121
|
*/
|
|
84
|
-
export declare const SettingsSchema: z<Schemastery.ObjectS<{
|
|
85
|
-
defaultProvider: z<string, string>;
|
|
86
|
-
defaultModel: z<string, string>;
|
|
87
|
-
defaultReasoningEffort: z<string, string>;
|
|
88
|
-
defaultRole: z<string, string>;
|
|
89
|
-
fallbackOnInvalid: z<boolean, boolean>;
|
|
90
|
-
roles: z<import("@deepseek-ai/cosmokit").Dict<{
|
|
122
|
+
export declare const SettingsSchema: z<Schemastery.ObjectS<NoInfer<{
|
|
123
|
+
defaultProvider: z<string, string, "volatile">;
|
|
124
|
+
defaultModel: z<string, string, "volatile">;
|
|
125
|
+
defaultReasoningEffort: z<string, string, "volatile">;
|
|
126
|
+
defaultRole: z<string, string, "volatile">;
|
|
127
|
+
fallbackOnInvalid: z<boolean, boolean, "volatile-defined">;
|
|
128
|
+
roles: z<NoInfer<import("@deepseek-ai/cosmokit").Dict<{
|
|
91
129
|
displayName?: string | null | undefined;
|
|
92
130
|
description?: string | null | undefined;
|
|
93
131
|
persona?: string | null | undefined;
|
|
@@ -98,28 +136,28 @@ export declare const SettingsSchema: z<Schemastery.ObjectS<{
|
|
|
98
136
|
allow?: string[] | null | undefined;
|
|
99
137
|
deny?: string[] | null | undefined;
|
|
100
138
|
} & import("@deepseek-ai/cosmokit").Dict) | null | undefined;
|
|
101
|
-
} & import("@deepseek-ai/cosmokit").Dict, string
|
|
102
|
-
displayName: z<string, string>;
|
|
103
|
-
description: z<string, string>;
|
|
104
|
-
persona: z<string, string>;
|
|
105
|
-
provider: z<string, string>;
|
|
106
|
-
model: z<string, string>;
|
|
107
|
-
reasoningEffort: z<string, string>;
|
|
108
|
-
toolFilter: z<Schemastery.ObjectS<{
|
|
109
|
-
allow: z<string[], string[]>;
|
|
110
|
-
deny: z<string[], string[]>;
|
|
111
|
-
}
|
|
112
|
-
allow: z<string[], string[]>;
|
|
113
|
-
deny: z<string[], string[]>;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
defaultProvider: z<string, string>;
|
|
118
|
-
defaultModel: z<string, string>;
|
|
119
|
-
defaultReasoningEffort: z<string, string>;
|
|
120
|
-
defaultRole: z<string, string>;
|
|
121
|
-
fallbackOnInvalid: z<boolean, boolean>;
|
|
122
|
-
roles: z<import("@deepseek-ai/cosmokit").Dict<{
|
|
139
|
+
} & import("@deepseek-ai/cosmokit").Dict, string>>, NoInfer<import("@deepseek-ai/cosmokit").Dict<Schemastery.ObjectT<NoInfer<{
|
|
140
|
+
displayName: z<string, string, "defined">;
|
|
141
|
+
description: z<string, string, "defined">;
|
|
142
|
+
persona: z<string, string, "plain">;
|
|
143
|
+
provider: z<string, string, "plain">;
|
|
144
|
+
model: z<string, string, "plain">;
|
|
145
|
+
reasoningEffort: z<string, string, "plain">;
|
|
146
|
+
toolFilter: z<Schemastery.ObjectS<NoInfer<{
|
|
147
|
+
allow: z<string[], string[], "plain">;
|
|
148
|
+
deny: z<string[], string[], "plain">;
|
|
149
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
150
|
+
allow: z<string[], string[], "plain">;
|
|
151
|
+
deny: z<string[], string[], "plain">;
|
|
152
|
+
}>>, "defined">;
|
|
153
|
+
}>>, string>>, "volatile">;
|
|
154
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
155
|
+
defaultProvider: z<string, string, "volatile">;
|
|
156
|
+
defaultModel: z<string, string, "volatile">;
|
|
157
|
+
defaultReasoningEffort: z<string, string, "volatile">;
|
|
158
|
+
defaultRole: z<string, string, "volatile">;
|
|
159
|
+
fallbackOnInvalid: z<boolean, boolean, "volatile-defined">;
|
|
160
|
+
roles: z<NoInfer<import("@deepseek-ai/cosmokit").Dict<{
|
|
123
161
|
displayName?: string | null | undefined;
|
|
124
162
|
description?: string | null | undefined;
|
|
125
163
|
persona?: string | null | undefined;
|
|
@@ -130,53 +168,127 @@ export declare const SettingsSchema: z<Schemastery.ObjectS<{
|
|
|
130
168
|
allow?: string[] | null | undefined;
|
|
131
169
|
deny?: string[] | null | undefined;
|
|
132
170
|
} & import("@deepseek-ai/cosmokit").Dict) | null | undefined;
|
|
133
|
-
} & import("@deepseek-ai/cosmokit").Dict, string
|
|
134
|
-
displayName: z<string, string>;
|
|
135
|
-
description: z<string, string>;
|
|
136
|
-
persona: z<string, string>;
|
|
137
|
-
provider: z<string, string>;
|
|
138
|
-
model: z<string, string>;
|
|
139
|
-
reasoningEffort: z<string, string>;
|
|
140
|
-
toolFilter: z<Schemastery.ObjectS<{
|
|
141
|
-
allow: z<string[], string[]>;
|
|
142
|
-
deny: z<string[], string[]>;
|
|
143
|
-
}
|
|
144
|
-
allow: z<string[], string[]>;
|
|
145
|
-
deny: z<string[], string[]>;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
171
|
+
} & import("@deepseek-ai/cosmokit").Dict, string>>, NoInfer<import("@deepseek-ai/cosmokit").Dict<Schemastery.ObjectT<NoInfer<{
|
|
172
|
+
displayName: z<string, string, "defined">;
|
|
173
|
+
description: z<string, string, "defined">;
|
|
174
|
+
persona: z<string, string, "plain">;
|
|
175
|
+
provider: z<string, string, "plain">;
|
|
176
|
+
model: z<string, string, "plain">;
|
|
177
|
+
reasoningEffort: z<string, string, "plain">;
|
|
178
|
+
toolFilter: z<Schemastery.ObjectS<NoInfer<{
|
|
179
|
+
allow: z<string[], string[], "plain">;
|
|
180
|
+
deny: z<string[], string[], "plain">;
|
|
181
|
+
}>>, Schemastery.ObjectT<NoInfer<{
|
|
182
|
+
allow: z<string[], string[], "plain">;
|
|
183
|
+
deny: z<string[], string[], "plain">;
|
|
184
|
+
}>>, "defined">;
|
|
185
|
+
}>>, string>>, "volatile">;
|
|
186
|
+
}>>, "plain">;
|
|
187
|
+
/**
|
|
188
|
+
* The resolved-config handles for the settings fields: each is a stable
|
|
189
|
+
* `Volatile` reference whose `get()` returns the current value. Used as the
|
|
190
|
+
* config parameter type so the plugin reads live values.
|
|
191
|
+
*/
|
|
192
|
+
export interface DirectorSettingsHandles {
|
|
193
|
+
defaultProvider: Volatile<string | undefined>;
|
|
194
|
+
defaultModel: Volatile<string | undefined>;
|
|
195
|
+
defaultReasoningEffort: Volatile<string | undefined>;
|
|
196
|
+
defaultRole: Volatile<string | undefined>;
|
|
197
|
+
fallbackOnInvalid: Volatile<boolean>;
|
|
198
|
+
roles: Volatile<Record<string, RoleTemplate> | undefined>;
|
|
199
|
+
}
|
|
149
200
|
/**
|
|
150
|
-
*
|
|
201
|
+
* Project the live Config handles onto the plain settings snapshot consumed by
|
|
202
|
+
* the resolver/guidance. Mirrors the Host schema in src/settings.ts.
|
|
151
203
|
*
|
|
152
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
204
|
+
* Read-time hardening: the only cross-field constraint a schemastery schema
|
|
205
|
+
* cannot express — a `defaultRole` that references no defined role — is checked
|
|
206
|
+
* here and reported through the optional `warnings` collector. On 0.1.7 the
|
|
207
|
+
* settings write path admits such a dangling reference (the schema is the write
|
|
208
|
+
* gate and it is per-field only); surfacing it at read time restores the
|
|
209
|
+
* equivalent safety the old write-time validator gave, without refusing the
|
|
210
|
+
* write. The dangling value itself is returned UNCHANGED — the user's stored
|
|
211
|
+
* configuration must stay as written so the mistake remains correctable.
|
|
212
|
+
*
|
|
213
|
+
* @param config - the resolved Cordis config carrying the volatile handles.
|
|
214
|
+
* @param warnings - optional out-collector; when supplied it receives every
|
|
215
|
+
* read-time warning (see {@link settingsWarnings}). Omitted by callers that
|
|
216
|
+
* only need the snapshot, keeping the no-arg path byte-identical.
|
|
217
|
+
* @returns a detached settings snapshot (fresh object each call).
|
|
218
|
+
*/
|
|
219
|
+
export declare function readDirectorSettings(config: DirectorSettingsHandles, warnings?: string[]): SubagentDirectorSettings;
|
|
220
|
+
/**
|
|
221
|
+
* Warning for a `defaultRole` that references no defined role, or undefined
|
|
222
|
+
* when the reference is sound (or unset). The cross-field reference the
|
|
223
|
+
* schemastery schema cannot express; pure — reads the snapshot only.
|
|
224
|
+
*/
|
|
225
|
+
export declare function danglingDefaultRoleWarning(settings: SubagentDirectorSettings): string | undefined;
|
|
226
|
+
/**
|
|
227
|
+
* Read-time warnings for a resolved settings snapshot. A list (not a single
|
|
228
|
+
* value) so further read-time checks can be added without changing callers.
|
|
229
|
+
* Today the only entry is a dangling `defaultRole`.
|
|
230
|
+
*/
|
|
231
|
+
export declare function settingsWarnings(settings: SubagentDirectorSettings): string[];
|
|
232
|
+
/**
|
|
233
|
+
* Wrap a warn sink in a deduplicating emitter keyed on the warning-set
|
|
234
|
+
* signature, so a persistent misconfiguration warns once per read rather than
|
|
235
|
+
* on every read: an unchanged set is swallowed, an empty set clears the
|
|
236
|
+
* memory (a fixing write stops the noise), and a changed set re-warns.
|
|
237
|
+
*
|
|
238
|
+
* @param emit - receives each warning string that should be logged.
|
|
239
|
+
* @returns a function to call with the warnings of one settings read.
|
|
240
|
+
*/
|
|
241
|
+
export declare function createSettingsWarner(emit: (message: string) => void): (warnings: readonly string[]) => void;
|
|
242
|
+
/**
|
|
243
|
+
* Semantic validator for a resolved settings section (design 5.2).
|
|
244
|
+
*
|
|
245
|
+
* On DSH ≤ 0.1.6 this was the settings write-time validator (installSection's
|
|
246
|
+
* `validate` hook): it threw to refuse a write. On 0.1.7 the write path has no
|
|
247
|
+
* custom validate hook — the Config schema is the write gate — so the
|
|
248
|
+
* per-field checks it performed (kebab-case role ids, non-empty
|
|
249
|
+
* displayName/description, non-blank provider) are now declared in
|
|
250
|
+
* {@link RoleTemplateSchema} / {@link SettingsFields} instead.
|
|
251
|
+
*
|
|
252
|
+
* The remaining cross-field check — a `defaultRole` that references no defined
|
|
253
|
+
* role — cannot be expressed in a schemastery schema. It is kept here for
|
|
254
|
+
* callers/tests that want to check it explicitly; the runtime route resolver
|
|
255
|
+
* already tolerates a dangling defaultRole by warning and skipping the binding,
|
|
256
|
+
* so no write is refused for it on 0.1.7.
|
|
158
257
|
*
|
|
159
258
|
* @param value - the resolved section, schema-valid by construction.
|
|
259
|
+
* @throws when the cross-field defaultRole reference is dangling.
|
|
160
260
|
*/
|
|
161
261
|
export declare function validateDirectorSettings(value: SubagentDirectorSettings): void;
|
|
162
262
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
263
|
+
* Register the plugin instance's settings page policy (DSH 0.1.7
|
|
264
|
+
* `SettingsForms.configure`).
|
|
165
265
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
*
|
|
266
|
+
* The plugin ships its own Web settings page (slot `settings.section`), so
|
|
267
|
+
* `auto:false` disables the Host's auto-generated page for this instance and
|
|
268
|
+
* avoids a duplicate page. The policy is registered into the plugin fiber's
|
|
269
|
+
* effects and removed on unload. `settings` is a required inject for this
|
|
270
|
+
* plugin, so the callback always runs on an active deployment.
|
|
271
|
+
*
|
|
272
|
+
* @param ctx - the plugin fiber's context.
|
|
273
|
+
*/
|
|
274
|
+
export declare function installDirectorSettingsPage(ctx: Context): void;
|
|
275
|
+
/** Structural face of `@deepseek-ai/dsh-settings`' `SettingsForms` used here. */
|
|
276
|
+
export interface SettingsFormsLike {
|
|
277
|
+
describe(options?: {
|
|
278
|
+
redactSecrets?: boolean;
|
|
279
|
+
}): readonly {
|
|
280
|
+
ns: string;
|
|
281
|
+
value?: unknown;
|
|
282
|
+
}[];
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Read one namespace's live (redacted) value from the settings seam's
|
|
286
|
+
* `describe()`. On 0.1.7 there is no `settings.get(ns)`; a namespace's live
|
|
287
|
+
* value is the descriptor's `value` projected from the running plugin config.
|
|
172
288
|
*
|
|
173
|
-
* @param
|
|
174
|
-
*
|
|
175
|
-
* @
|
|
176
|
-
* base while a provider is absent.
|
|
177
|
-
* @param hooks - source sink and change notification (plus optional validate).
|
|
289
|
+
* @param settings - the settings service (structural).
|
|
290
|
+
* @param ns - the profile entry id to read.
|
|
291
|
+
* @returns the redacted live value, or undefined when the ns is not active.
|
|
178
292
|
*/
|
|
179
|
-
export declare function
|
|
180
|
-
/** Convenience exported alias used by tests. */
|
|
181
|
-
export { SettingsSchema as SubagentDirectorSettingsSchema };
|
|
293
|
+
export declare function readNamespaceValue(settings: SettingsFormsLike | undefined, ns: string): unknown;
|
|
182
294
|
//# sourceMappingURL=settings.d.ts.map
|
package/lib/settings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,CAAC,MAAM,0BAA0B,CAAC;AAEzC,OAAO,KAAK,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAElF,qFAAqF;AACrF,eAAO,MAAM,oCAAoC,EAAG,mBAA4B,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,kCAAkC,EAAG,mCAA4C,CAAC;AAE/F,YAAY,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAElF,+EAA+E;AAC/E,eAAO,MAAM,UAAU,QAA+B,CAAC;AAKvD;oEACoE;AACpE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