@decocms/runtime 1.0.0-alpha.18 → 1.0.0-alpha.19
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/package.json +1 -1
- package/src/tools.ts +5 -2
package/package.json
CHANGED
package/src/tools.ts
CHANGED
|
@@ -155,7 +155,10 @@ export interface CreateMCPServerOptions<
|
|
|
155
155
|
> {
|
|
156
156
|
before?: (env: Env & DefaultEnv<TSchema>) => Promise<void> | void;
|
|
157
157
|
configuration?: {
|
|
158
|
-
onChange?: (
|
|
158
|
+
onChange?: (
|
|
159
|
+
env: Env & DefaultEnv<TSchema>,
|
|
160
|
+
cb: OnChangeCallback<TSchema>,
|
|
161
|
+
) => Promise<void>;
|
|
159
162
|
state?: TSchema;
|
|
160
163
|
scopes?: string[];
|
|
161
164
|
};
|
|
@@ -214,7 +217,7 @@ const configurationToolsFor = <TSchema extends z.ZodTypeAny = never>({
|
|
|
214
217
|
}),
|
|
215
218
|
outputSchema: z.object({}),
|
|
216
219
|
execute: async (input) => {
|
|
217
|
-
await onChange({
|
|
220
|
+
await onChange(input.runtimeContext.env, {
|
|
218
221
|
state: input.context.state,
|
|
219
222
|
scopes: input.context.scopes,
|
|
220
223
|
});
|