@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/tools.ts +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decocms/runtime",
3
- "version": "1.0.0-alpha.18",
3
+ "version": "1.0.0-alpha.19",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@cloudflare/workers-types": "^4.20250617.0",
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?: (cb: OnChangeCallback<TSchema>) => Promise<void>;
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
  });