@decocms/runtime 0.28.0 → 1.0.0-alpha.2

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 (86) hide show
  1. package/package.json +15 -76
  2. package/scripts/generate-json-schema.ts +24 -0
  3. package/src/asset-server/dev-server-proxy.ts +16 -0
  4. package/src/asset-server/index.ts +44 -0
  5. package/src/bindings/README.md +1 -1
  6. package/src/bindings/binder.ts +1 -1
  7. package/src/bindings/channels.ts +1 -1
  8. package/src/bindings/deconfig/resources.ts +47 -17
  9. package/src/bindings/deconfig/types.ts +1 -1
  10. package/src/bindings/index.ts +2 -0
  11. package/src/bindings/language-model/ai-sdk.ts +7 -4
  12. package/src/bindings/resources/bindings.ts +1 -1
  13. package/src/bindings/resources/schemas.ts +1 -1
  14. package/src/bindings/views.ts +1 -1
  15. package/src/bindings.ts +8 -7
  16. package/src/index.ts +5 -20
  17. package/src/mastra.ts +1 -229
  18. package/src/mcp.ts +7 -6
  19. package/src/proxy.ts +0 -8
  20. package/src/resources.ts +1 -1
  21. package/src/state.ts +1 -1
  22. package/src/views.ts +1 -1
  23. package/tsconfig.json +8 -0
  24. package/dist/admin.d.ts +0 -5
  25. package/dist/admin.js +0 -21
  26. package/dist/admin.js.map +0 -1
  27. package/dist/bindings/deconfig/index.d.ts +0 -12
  28. package/dist/bindings/deconfig/index.js +0 -10
  29. package/dist/bindings/deconfig/index.js.map +0 -1
  30. package/dist/bindings/index.d.ts +0 -2312
  31. package/dist/bindings/index.js +0 -135
  32. package/dist/bindings/index.js.map +0 -1
  33. package/dist/chunk-3AWMDSOH.js +0 -96
  34. package/dist/chunk-3AWMDSOH.js.map +0 -1
  35. package/dist/chunk-4XSQKJLU.js +0 -105
  36. package/dist/chunk-4XSQKJLU.js.map +0 -1
  37. package/dist/chunk-5EYZ2LVM.js +0 -158
  38. package/dist/chunk-5EYZ2LVM.js.map +0 -1
  39. package/dist/chunk-7ITSLORK.js +0 -128
  40. package/dist/chunk-7ITSLORK.js.map +0 -1
  41. package/dist/chunk-I7BWSAN6.js +0 -49
  42. package/dist/chunk-I7BWSAN6.js.map +0 -1
  43. package/dist/chunk-L4OT2YDO.js +0 -27
  44. package/dist/chunk-L4OT2YDO.js.map +0 -1
  45. package/dist/chunk-SHQSNOFL.js +0 -769
  46. package/dist/chunk-SHQSNOFL.js.map +0 -1
  47. package/dist/chunk-UHR3BLMF.js +0 -92
  48. package/dist/chunk-UHR3BLMF.js.map +0 -1
  49. package/dist/chunk-UIJGM3NV.js +0 -518
  50. package/dist/chunk-UIJGM3NV.js.map +0 -1
  51. package/dist/chunk-ZPUT6RN6.js +0 -32
  52. package/dist/chunk-ZPUT6RN6.js.map +0 -1
  53. package/dist/client.d.ts +0 -28
  54. package/dist/client.js +0 -5
  55. package/dist/client.js.map +0 -1
  56. package/dist/d1-store.d.ts +0 -9
  57. package/dist/d1-store.js +0 -4
  58. package/dist/d1-store.js.map +0 -1
  59. package/dist/drizzle.d.ts +0 -49
  60. package/dist/drizzle.js +0 -121
  61. package/dist/drizzle.js.map +0 -1
  62. package/dist/index-B7U9jXW4.d.ts +0 -530
  63. package/dist/index-uCMd27hU.d.ts +0 -471
  64. package/dist/index.d.ts +0 -10
  65. package/dist/index.js +0 -637
  66. package/dist/index.js.map +0 -1
  67. package/dist/mastra.d.ts +0 -10
  68. package/dist/mastra.js +0 -6
  69. package/dist/mastra.js.map +0 -1
  70. package/dist/mcp-DYmQ2RQf.d.ts +0 -105
  71. package/dist/mcp-client.d.ts +0 -232
  72. package/dist/mcp-client.js +0 -4
  73. package/dist/mcp-client.js.map +0 -1
  74. package/dist/proxy.d.ts +0 -11
  75. package/dist/proxy.js +0 -5
  76. package/dist/proxy.js.map +0 -1
  77. package/dist/resources.d.ts +0 -362
  78. package/dist/resources.js +0 -4
  79. package/dist/resources.js.map +0 -1
  80. package/dist/views.d.ts +0 -72
  81. package/dist/views.js +0 -4
  82. package/dist/views.js.map +0 -1
  83. package/src/cf-imports.ts +0 -1
  84. package/src/d1-store.ts +0 -34
  85. package/src/deprecated.ts +0 -59
  86. package/src/workflow.ts +0 -193
@@ -1,362 +0,0 @@
1
- import { z } from 'zod/v3';
2
-
3
- declare const ResourcesReadInputSchema: z.ZodObject<{
4
- name: z.ZodString;
5
- uri: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- name: string;
8
- uri: string;
9
- }, {
10
- name: string;
11
- uri: string;
12
- }>;
13
- declare const ResourcesReadOutputSchema: z.ZodObject<{
14
- name: z.ZodString;
15
- title: z.ZodOptional<z.ZodString>;
16
- description: z.ZodOptional<z.ZodString>;
17
- uri: z.ZodString;
18
- mimeType: z.ZodOptional<z.ZodString>;
19
- thumbnail: z.ZodOptional<z.ZodString>;
20
- timestamp: z.ZodOptional<z.ZodString>;
21
- size: z.ZodOptional<z.ZodNumber>;
22
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
23
- } & {
24
- data: z.ZodString;
25
- type: z.ZodEnum<["text", "blob"]>;
26
- }, "strip", z.ZodTypeAny, {
27
- type: "text" | "blob";
28
- name: string;
29
- data: string;
30
- uri: string;
31
- mimeType?: string | undefined;
32
- title?: string | undefined;
33
- description?: string | undefined;
34
- annotations?: Record<string, string> | undefined;
35
- thumbnail?: string | undefined;
36
- timestamp?: string | undefined;
37
- size?: number | undefined;
38
- }, {
39
- type: "text" | "blob";
40
- name: string;
41
- data: string;
42
- uri: string;
43
- mimeType?: string | undefined;
44
- title?: string | undefined;
45
- description?: string | undefined;
46
- annotations?: Record<string, string> | undefined;
47
- thumbnail?: string | undefined;
48
- timestamp?: string | undefined;
49
- size?: number | undefined;
50
- }>;
51
- declare const ResourceSearchInputSchema: z.ZodObject<{
52
- name: z.ZodString;
53
- term: z.ZodString;
54
- cursor: z.ZodOptional<z.ZodString>;
55
- limit: z.ZodOptional<z.ZodNumber>;
56
- }, "strip", z.ZodTypeAny, {
57
- name: string;
58
- term: string;
59
- cursor?: string | undefined;
60
- limit?: number | undefined;
61
- }, {
62
- name: string;
63
- term: string;
64
- cursor?: string | undefined;
65
- limit?: number | undefined;
66
- }>;
67
- declare const ResourceSearchOutputSchema: z.ZodObject<{
68
- items: z.ZodArray<z.ZodObject<{
69
- name: z.ZodString;
70
- title: z.ZodOptional<z.ZodString>;
71
- description: z.ZodOptional<z.ZodString>;
72
- uri: z.ZodString;
73
- mimeType: z.ZodOptional<z.ZodString>;
74
- thumbnail: z.ZodOptional<z.ZodString>;
75
- timestamp: z.ZodOptional<z.ZodString>;
76
- size: z.ZodOptional<z.ZodNumber>;
77
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
78
- }, "strip", z.ZodTypeAny, {
79
- name: string;
80
- uri: string;
81
- mimeType?: string | undefined;
82
- title?: string | undefined;
83
- description?: string | undefined;
84
- annotations?: Record<string, string> | undefined;
85
- thumbnail?: string | undefined;
86
- timestamp?: string | undefined;
87
- size?: number | undefined;
88
- }, {
89
- name: string;
90
- uri: string;
91
- mimeType?: string | undefined;
92
- title?: string | undefined;
93
- description?: string | undefined;
94
- annotations?: Record<string, string> | undefined;
95
- thumbnail?: string | undefined;
96
- timestamp?: string | undefined;
97
- size?: number | undefined;
98
- }>, "many">;
99
- hasMore: z.ZodBoolean;
100
- nextCursor: z.ZodOptional<z.ZodString>;
101
- }, "strip", z.ZodTypeAny, {
102
- items: {
103
- name: string;
104
- uri: string;
105
- mimeType?: string | undefined;
106
- title?: string | undefined;
107
- description?: string | undefined;
108
- annotations?: Record<string, string> | undefined;
109
- thumbnail?: string | undefined;
110
- timestamp?: string | undefined;
111
- size?: number | undefined;
112
- }[];
113
- hasMore: boolean;
114
- nextCursor?: string | undefined;
115
- }, {
116
- items: {
117
- name: string;
118
- uri: string;
119
- mimeType?: string | undefined;
120
- title?: string | undefined;
121
- description?: string | undefined;
122
- annotations?: Record<string, string> | undefined;
123
- thumbnail?: string | undefined;
124
- timestamp?: string | undefined;
125
- size?: number | undefined;
126
- }[];
127
- hasMore: boolean;
128
- nextCursor?: string | undefined;
129
- }>;
130
- declare const ResourceCreateInputSchema: z.ZodObject<{
131
- name: z.ZodString;
132
- resourceName: z.ZodString;
133
- title: z.ZodOptional<z.ZodString>;
134
- description: z.ZodOptional<z.ZodString>;
135
- content: z.ZodObject<{
136
- data: z.ZodString;
137
- type: z.ZodEnum<["text", "blob"]>;
138
- mimeType: z.ZodOptional<z.ZodString>;
139
- }, "strip", z.ZodTypeAny, {
140
- type: "text" | "blob";
141
- data: string;
142
- mimeType?: string | undefined;
143
- }, {
144
- type: "text" | "blob";
145
- data: string;
146
- mimeType?: string | undefined;
147
- }>;
148
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
149
- }, "strip", z.ZodTypeAny, {
150
- name: string;
151
- content: {
152
- type: "text" | "blob";
153
- data: string;
154
- mimeType?: string | undefined;
155
- };
156
- resourceName: string;
157
- metadata?: Record<string, any> | undefined;
158
- title?: string | undefined;
159
- description?: string | undefined;
160
- }, {
161
- name: string;
162
- content: {
163
- type: "text" | "blob";
164
- data: string;
165
- mimeType?: string | undefined;
166
- };
167
- resourceName: string;
168
- metadata?: Record<string, any> | undefined;
169
- title?: string | undefined;
170
- description?: string | undefined;
171
- }>;
172
- declare const ResourceCreateOutputSchema: z.ZodObject<{
173
- name: z.ZodString;
174
- title: z.ZodOptional<z.ZodString>;
175
- description: z.ZodOptional<z.ZodString>;
176
- uri: z.ZodString;
177
- mimeType: z.ZodOptional<z.ZodString>;
178
- thumbnail: z.ZodOptional<z.ZodString>;
179
- timestamp: z.ZodOptional<z.ZodString>;
180
- size: z.ZodOptional<z.ZodNumber>;
181
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
182
- }, "strip", z.ZodTypeAny, {
183
- name: string;
184
- uri: string;
185
- mimeType?: string | undefined;
186
- title?: string | undefined;
187
- description?: string | undefined;
188
- annotations?: Record<string, string> | undefined;
189
- thumbnail?: string | undefined;
190
- timestamp?: string | undefined;
191
- size?: number | undefined;
192
- }, {
193
- name: string;
194
- uri: string;
195
- mimeType?: string | undefined;
196
- title?: string | undefined;
197
- description?: string | undefined;
198
- annotations?: Record<string, string> | undefined;
199
- thumbnail?: string | undefined;
200
- timestamp?: string | undefined;
201
- size?: number | undefined;
202
- }>;
203
- declare const ResourceUpdateInputSchema: z.ZodObject<{
204
- name: z.ZodString;
205
- uri: z.ZodString;
206
- resourceName: z.ZodOptional<z.ZodString>;
207
- title: z.ZodOptional<z.ZodString>;
208
- description: z.ZodOptional<z.ZodString>;
209
- content: z.ZodOptional<z.ZodObject<{
210
- data: z.ZodString;
211
- type: z.ZodEnum<["text", "blob"]>;
212
- mimeType: z.ZodOptional<z.ZodString>;
213
- }, "strip", z.ZodTypeAny, {
214
- type: "text" | "blob";
215
- data: string;
216
- mimeType?: string | undefined;
217
- }, {
218
- type: "text" | "blob";
219
- data: string;
220
- mimeType?: string | undefined;
221
- }>>;
222
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
223
- }, "strip", z.ZodTypeAny, {
224
- name: string;
225
- uri: string;
226
- metadata?: Record<string, any> | undefined;
227
- content?: {
228
- type: "text" | "blob";
229
- data: string;
230
- mimeType?: string | undefined;
231
- } | undefined;
232
- title?: string | undefined;
233
- description?: string | undefined;
234
- resourceName?: string | undefined;
235
- }, {
236
- name: string;
237
- uri: string;
238
- metadata?: Record<string, any> | undefined;
239
- content?: {
240
- type: "text" | "blob";
241
- data: string;
242
- mimeType?: string | undefined;
243
- } | undefined;
244
- title?: string | undefined;
245
- description?: string | undefined;
246
- resourceName?: string | undefined;
247
- }>;
248
- declare const ResourceUpdateOutputSchema: z.ZodObject<{
249
- name: z.ZodString;
250
- title: z.ZodOptional<z.ZodString>;
251
- description: z.ZodOptional<z.ZodString>;
252
- uri: z.ZodString;
253
- mimeType: z.ZodOptional<z.ZodString>;
254
- thumbnail: z.ZodOptional<z.ZodString>;
255
- timestamp: z.ZodOptional<z.ZodString>;
256
- size: z.ZodOptional<z.ZodNumber>;
257
- annotations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
258
- }, "strip", z.ZodTypeAny, {
259
- name: string;
260
- uri: string;
261
- mimeType?: string | undefined;
262
- title?: string | undefined;
263
- description?: string | undefined;
264
- annotations?: Record<string, string> | undefined;
265
- thumbnail?: string | undefined;
266
- timestamp?: string | undefined;
267
- size?: number | undefined;
268
- }, {
269
- name: string;
270
- uri: string;
271
- mimeType?: string | undefined;
272
- title?: string | undefined;
273
- description?: string | undefined;
274
- annotations?: Record<string, string> | undefined;
275
- thumbnail?: string | undefined;
276
- timestamp?: string | undefined;
277
- size?: number | undefined;
278
- }>;
279
- declare const ResourceDeleteInputSchema: z.ZodObject<{
280
- name: z.ZodString;
281
- uri: z.ZodString;
282
- force: z.ZodOptional<z.ZodBoolean>;
283
- }, "strip", z.ZodTypeAny, {
284
- name: string;
285
- uri: string;
286
- force?: boolean | undefined;
287
- }, {
288
- name: string;
289
- uri: string;
290
- force?: boolean | undefined;
291
- }>;
292
- declare const ResourceDeleteOutputSchema: z.ZodObject<{
293
- deletedUri: z.ZodString;
294
- }, "strip", z.ZodTypeAny, {
295
- deletedUri: string;
296
- }, {
297
- deletedUri: string;
298
- }>;
299
- declare const ResourcesListInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
300
- declare const ResourcesListOutputSchema: z.ZodObject<{
301
- resources: z.ZodArray<z.ZodObject<{
302
- name: z.ZodString;
303
- icon: z.ZodString;
304
- title: z.ZodString;
305
- description: z.ZodString;
306
- hasCreate: z.ZodOptional<z.ZodBoolean>;
307
- hasUpdate: z.ZodOptional<z.ZodBoolean>;
308
- hasDelete: z.ZodOptional<z.ZodBoolean>;
309
- }, "strip", z.ZodTypeAny, {
310
- name: string;
311
- title: string;
312
- description: string;
313
- icon: string;
314
- hasCreate?: boolean | undefined;
315
- hasUpdate?: boolean | undefined;
316
- hasDelete?: boolean | undefined;
317
- }, {
318
- name: string;
319
- title: string;
320
- description: string;
321
- icon: string;
322
- hasCreate?: boolean | undefined;
323
- hasUpdate?: boolean | undefined;
324
- hasDelete?: boolean | undefined;
325
- }>, "many">;
326
- }, "strip", z.ZodTypeAny, {
327
- resources: {
328
- name: string;
329
- title: string;
330
- description: string;
331
- icon: string;
332
- hasCreate?: boolean | undefined;
333
- hasUpdate?: boolean | undefined;
334
- hasDelete?: boolean | undefined;
335
- }[];
336
- }, {
337
- resources: {
338
- name: string;
339
- title: string;
340
- description: string;
341
- icon: string;
342
- hasCreate?: boolean | undefined;
343
- hasUpdate?: boolean | undefined;
344
- hasDelete?: boolean | undefined;
345
- }[];
346
- }>;
347
- type Resource = z.infer<typeof ResourceCreateOutputSchema>;
348
- type ResourcesReadInput = z.infer<typeof ResourcesReadInputSchema>;
349
- type ResourcesReadOutput = z.infer<typeof ResourcesReadOutputSchema>;
350
- type ResourcesSearchInput = z.infer<typeof ResourceSearchInputSchema>;
351
- type ResourcesSearchOutput = z.infer<typeof ResourceSearchOutputSchema>;
352
- type ResourceCreateInput = z.infer<typeof ResourceCreateInputSchema>;
353
- type ResourceCreateOutput = z.infer<typeof ResourceCreateOutputSchema>;
354
- type ResourceUpdateInput = z.infer<typeof ResourceUpdateInputSchema>;
355
- type ResourceUpdateOutput = z.infer<typeof ResourceUpdateOutputSchema>;
356
- type ResourceDeleteInput = z.infer<typeof ResourceDeleteInputSchema>;
357
- type ResourceDeleteOutput = z.infer<typeof ResourceDeleteOutputSchema>;
358
- type ResourcesListInput = z.infer<typeof ResourcesListInputSchema>;
359
- type ResourcesListOutput = z.infer<typeof ResourcesListOutputSchema>;
360
- declare const mimeType: (filePathOrExtension: string) => string;
361
-
362
- export { type Resource, type ResourceCreateInput, ResourceCreateInputSchema, type ResourceCreateOutput, ResourceCreateOutputSchema, type ResourceDeleteInput, ResourceDeleteInputSchema, type ResourceDeleteOutput, ResourceDeleteOutputSchema, ResourceSearchInputSchema, ResourceSearchOutputSchema, type ResourceUpdateInput, ResourceUpdateInputSchema, type ResourceUpdateOutput, ResourceUpdateOutputSchema, type ResourcesListInput, ResourcesListInputSchema, type ResourcesListOutput, ResourcesListOutputSchema, type ResourcesReadInput, ResourcesReadInputSchema, type ResourcesReadOutput, ResourcesReadOutputSchema, type ResourcesSearchInput, type ResourcesSearchOutput, mimeType };
package/dist/resources.js DELETED
@@ -1,4 +0,0 @@
1
- export { ResourceCreateInputSchema, ResourceCreateOutputSchema, ResourceDeleteInputSchema, ResourceDeleteOutputSchema, ResourceSearchInputSchema, ResourceSearchOutputSchema, ResourceUpdateInputSchema, ResourceUpdateOutputSchema, ResourcesListInputSchema, ResourcesListOutputSchema, ResourcesReadInputSchema, ResourcesReadOutputSchema, mimeType } from './chunk-7ITSLORK.js';
2
- import './chunk-I7BWSAN6.js';
3
- //# sourceMappingURL=resources.js.map
4
- //# sourceMappingURL=resources.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"resources.js"}
package/dist/views.d.ts DELETED
@@ -1,72 +0,0 @@
1
- import { z } from 'zod/v3';
2
-
3
- declare const ViewsListOutputSchema: z.ZodObject<{
4
- views: z.ZodArray<z.ZodObject<{
5
- id: z.ZodOptional<z.ZodString>;
6
- name: z.ZodOptional<z.ZodString>;
7
- title: z.ZodString;
8
- description: z.ZodOptional<z.ZodString>;
9
- icon: z.ZodString;
10
- url: z.ZodOptional<z.ZodString>;
11
- mimeTypePattern: z.ZodOptional<z.ZodString>;
12
- resourceName: z.ZodOptional<z.ZodString>;
13
- tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
14
- prompt: z.ZodOptional<z.ZodString>;
15
- installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
16
- }, "strip", z.ZodTypeAny, {
17
- tools: string[];
18
- title: string;
19
- icon: string;
20
- id?: string | undefined;
21
- url?: string | undefined;
22
- name?: string | undefined;
23
- description?: string | undefined;
24
- resourceName?: string | undefined;
25
- mimeTypePattern?: string | undefined;
26
- prompt?: string | undefined;
27
- installBehavior?: "open" | "none" | "autoPin" | undefined;
28
- }, {
29
- title: string;
30
- icon: string;
31
- id?: string | undefined;
32
- url?: string | undefined;
33
- name?: string | undefined;
34
- tools?: string[] | undefined;
35
- description?: string | undefined;
36
- resourceName?: string | undefined;
37
- mimeTypePattern?: string | undefined;
38
- prompt?: string | undefined;
39
- installBehavior?: "open" | "none" | "autoPin" | undefined;
40
- }>, "many">;
41
- }, "strip", z.ZodTypeAny, {
42
- views: {
43
- tools: string[];
44
- title: string;
45
- icon: string;
46
- id?: string | undefined;
47
- url?: string | undefined;
48
- name?: string | undefined;
49
- description?: string | undefined;
50
- resourceName?: string | undefined;
51
- mimeTypePattern?: string | undefined;
52
- prompt?: string | undefined;
53
- installBehavior?: "open" | "none" | "autoPin" | undefined;
54
- }[];
55
- }, {
56
- views: {
57
- title: string;
58
- icon: string;
59
- id?: string | undefined;
60
- url?: string | undefined;
61
- name?: string | undefined;
62
- tools?: string[] | undefined;
63
- description?: string | undefined;
64
- resourceName?: string | undefined;
65
- mimeTypePattern?: string | undefined;
66
- prompt?: string | undefined;
67
- installBehavior?: "open" | "none" | "autoPin" | undefined;
68
- }[];
69
- }>;
70
- type ViewsListOutput = z.infer<typeof ViewsListOutputSchema>;
71
-
72
- export { type ViewsListOutput, ViewsListOutputSchema };
package/dist/views.js DELETED
@@ -1,4 +0,0 @@
1
- export { ViewsListOutputSchema } from './chunk-L4OT2YDO.js';
2
- import './chunk-I7BWSAN6.js';
3
- //# sourceMappingURL=views.js.map
4
- //# sourceMappingURL=views.js.map
package/dist/views.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"views.js"}
package/src/cf-imports.ts DELETED
@@ -1 +0,0 @@
1
- export { DurableObject } from "cloudflare:workers";
package/src/d1-store.ts DELETED
@@ -1,34 +0,0 @@
1
- import {
2
- D1ClientConfig as MastraD1StoreConfig,
3
- D1Store as MastraD1Store,
4
- } from "@mastra/cloudflare-d1";
5
-
6
- export class D1Store extends MastraD1Store {
7
- constructor(private config: MastraD1StoreConfig) {
8
- super(config);
9
- }
10
-
11
- override async init() {
12
- await super.init();
13
-
14
- // Create indexes for better performance on frequently queried columns
15
- const indexQueries = [
16
- {
17
- sql: "CREATE INDEX IF NOT EXISTS idx_mastra_workflow_snapshot_created_at ON mastra_workflow_snapshot(createdAt)",
18
- params: [],
19
- },
20
- {
21
- sql: "CREATE INDEX IF NOT EXISTS idx_mastra_messages_created_at ON mastra_messages(createdAt)",
22
- params: [],
23
- },
24
- ];
25
-
26
- // Execute each index creation query
27
- for (const { sql, params } of indexQueries) {
28
- await this.config.client.query({
29
- sql,
30
- params,
31
- });
32
- }
33
- }
34
- }
package/src/deprecated.ts DELETED
@@ -1,59 +0,0 @@
1
- import type { RequestContext } from "./index.ts";
2
- import type { DurableObjectNamespace } from "@cloudflare/workers-types";
3
- import type { WorkspaceDB } from "./index.ts";
4
- import type { WorkflowDO } from "./workflow.ts";
5
- import type { z } from "zod/v3";
6
-
7
- // oxlint-disable-next-line no-explicit-any
8
- export interface DeprecatedEnv<TSchema extends z.ZodTypeAny = any> {
9
- /**
10
- * @deprecated Use DECO_REQUEST_CONTEXT instead
11
- */
12
- DECO_CHAT_REQUEST_CONTEXT: RequestContext<TSchema>;
13
- /**
14
- * @deprecated Use DECO_APP_NAME instead
15
- */
16
- DECO_CHAT_APP_NAME: string;
17
- /**
18
- * @deprecated Use DECO_APP_SLUG instead
19
- */
20
- DECO_CHAT_APP_SLUG: string;
21
- /**
22
- * @deprecated Use DECO_APP_ENTRYPOINT instead
23
- */
24
- DECO_CHAT_APP_ENTRYPOINT: string;
25
- /**
26
- * @deprecated Use DECO_API_URL instead
27
- */
28
- DECO_CHAT_API_URL?: string;
29
- /**
30
- * @deprecated Use DECO_WORKSPACE instead
31
- */
32
- DECO_CHAT_WORKSPACE: string;
33
- /**
34
- * @deprecated Use DECO_API_JWT_PUBLIC_KEY instead
35
- */
36
- DECO_CHAT_API_JWT_PUBLIC_KEY: string;
37
- /**
38
- * @deprecated Use DECO_APP_DEPLOYMENT_ID instead
39
- */
40
- DECO_CHAT_APP_DEPLOYMENT_ID: string;
41
- /**
42
- * @deprecated Use DECO_BINDINGS instead
43
- */
44
- DECO_CHAT_BINDINGS: string;
45
- /**
46
- * @deprecated Use DECO_API_TOKEN instead
47
- */
48
- DECO_CHAT_API_TOKEN: string;
49
- /**
50
- * @deprecated Use DECO_WORKFLOW_DO instead
51
- */
52
- DECO_CHAT_WORKFLOW_DO: DurableObjectNamespace<WorkflowDO>;
53
- /**
54
- * @deprecated Use DECO_WORKSPACE_DB instead
55
- */
56
- DECO_CHAT_WORKSPACE_DB: WorkspaceDB & {
57
- forContext: (ctx: RequestContext) => WorkspaceDB;
58
- };
59
- }