@decocms/runtime 0.28.1 → 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 (85) 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/language-model/ai-sdk.ts +7 -4
  11. package/src/bindings/resources/bindings.ts +1 -1
  12. package/src/bindings/resources/schemas.ts +1 -1
  13. package/src/bindings/views.ts +1 -1
  14. package/src/bindings.ts +8 -7
  15. package/src/index.ts +5 -20
  16. package/src/mastra.ts +1 -229
  17. package/src/mcp.ts +7 -6
  18. package/src/proxy.ts +0 -8
  19. package/src/resources.ts +1 -1
  20. package/src/state.ts +1 -1
  21. package/src/views.ts +1 -1
  22. package/tsconfig.json +8 -0
  23. package/dist/admin.d.ts +0 -5
  24. package/dist/admin.js +0 -21
  25. package/dist/admin.js.map +0 -1
  26. package/dist/bindings/deconfig/index.d.ts +0 -12
  27. package/dist/bindings/deconfig/index.js +0 -10
  28. package/dist/bindings/deconfig/index.js.map +0 -1
  29. package/dist/bindings/index.d.ts +0 -2315
  30. package/dist/bindings/index.js +0 -156
  31. package/dist/bindings/index.js.map +0 -1
  32. package/dist/chunk-3AWMDSOH.js +0 -96
  33. package/dist/chunk-3AWMDSOH.js.map +0 -1
  34. package/dist/chunk-4XSQKJLU.js +0 -105
  35. package/dist/chunk-4XSQKJLU.js.map +0 -1
  36. package/dist/chunk-5EYZ2LVM.js +0 -158
  37. package/dist/chunk-5EYZ2LVM.js.map +0 -1
  38. package/dist/chunk-7ITSLORK.js +0 -128
  39. package/dist/chunk-7ITSLORK.js.map +0 -1
  40. package/dist/chunk-I7BWSAN6.js +0 -49
  41. package/dist/chunk-I7BWSAN6.js.map +0 -1
  42. package/dist/chunk-L4OT2YDO.js +0 -27
  43. package/dist/chunk-L4OT2YDO.js.map +0 -1
  44. package/dist/chunk-SHQSNOFL.js +0 -769
  45. package/dist/chunk-SHQSNOFL.js.map +0 -1
  46. package/dist/chunk-UHR3BLMF.js +0 -92
  47. package/dist/chunk-UHR3BLMF.js.map +0 -1
  48. package/dist/chunk-UIJGM3NV.js +0 -518
  49. package/dist/chunk-UIJGM3NV.js.map +0 -1
  50. package/dist/chunk-ZPUT6RN6.js +0 -32
  51. package/dist/chunk-ZPUT6RN6.js.map +0 -1
  52. package/dist/client.d.ts +0 -28
  53. package/dist/client.js +0 -5
  54. package/dist/client.js.map +0 -1
  55. package/dist/d1-store.d.ts +0 -9
  56. package/dist/d1-store.js +0 -4
  57. package/dist/d1-store.js.map +0 -1
  58. package/dist/drizzle.d.ts +0 -49
  59. package/dist/drizzle.js +0 -121
  60. package/dist/drizzle.js.map +0 -1
  61. package/dist/index-LOfgE9a_.d.ts +0 -471
  62. package/dist/index-xKtm7A7B.d.ts +0 -530
  63. package/dist/index.d.ts +0 -10
  64. package/dist/index.js +0 -637
  65. package/dist/index.js.map +0 -1
  66. package/dist/mastra.d.ts +0 -10
  67. package/dist/mastra.js +0 -6
  68. package/dist/mastra.js.map +0 -1
  69. package/dist/mcp-87iLaW9V.d.ts +0 -105
  70. package/dist/mcp-client.d.ts +0 -232
  71. package/dist/mcp-client.js +0 -4
  72. package/dist/mcp-client.js.map +0 -1
  73. package/dist/proxy.d.ts +0 -11
  74. package/dist/proxy.js +0 -5
  75. package/dist/proxy.js.map +0 -1
  76. package/dist/resources.d.ts +0 -362
  77. package/dist/resources.js +0 -4
  78. package/dist/resources.js.map +0 -1
  79. package/dist/views.d.ts +0 -72
  80. package/dist/views.js +0 -4
  81. package/dist/views.js.map +0 -1
  82. package/src/cf-imports.ts +0 -1
  83. package/src/d1-store.ts +0 -34
  84. package/src/deprecated.ts +0 -59
  85. package/src/workflow.ts +0 -193
@@ -1,2315 +0,0 @@
1
- import * as zod from 'zod';
2
- export { B as BaseResourceDataSchema, D as DeconfigClient, b as DeconfigResourceOptions, E as EnhancedResourcesTools, f as ResourceBinding, g as ResourceBindingsFunction, R as ResourcesBinding, d as ResourcesTools, a as createDeconfigResource, c as createResourceBindings, e as deconfigTools } from '../index-xKtm7A7B.js';
3
- import * as _mastra_core from '@mastra/core';
4
- import { c as createPrivateTool, a as createStreamableTool, S as StreamableTool } from '../index-LOfgE9a_.js';
5
- import { z } from 'zod/v3';
6
- import { MCPConnection } from '@decocms/bindings/connection';
7
- import { M as MCPClientFetchStub } from '../mcp-87iLaW9V.js';
8
- import { ToolBinder } from '@decocms/bindings';
9
- import { LanguageModelV2StreamPart } from '@ai-sdk/provider';
10
- import '@cloudflare/workers-types';
11
- import '@mastra/core/di';
12
- import '@mastra/core/workflows';
13
- import '../resources.js';
14
-
15
- declare const callbacksSchema: z.ZodObject<{
16
- stream: z.ZodString;
17
- generate: z.ZodString;
18
- generateObject: z.ZodString;
19
- }, "strip", z.ZodTypeAny, {
20
- stream: string;
21
- generate: string;
22
- generateObject: string;
23
- }, {
24
- stream: string;
25
- generate: string;
26
- generateObject: string;
27
- }>;
28
- declare const joinChannelSchema: z.ZodObject<{
29
- workspace: z.ZodString;
30
- discriminator: z.ZodString;
31
- } & {
32
- agentId: z.ZodString;
33
- agentName: z.ZodString;
34
- agentLink: z.ZodString;
35
- } & {
36
- callbacks: z.ZodObject<{
37
- stream: z.ZodString;
38
- generate: z.ZodString;
39
- generateObject: z.ZodString;
40
- }, "strip", z.ZodTypeAny, {
41
- stream: string;
42
- generate: string;
43
- generateObject: string;
44
- }, {
45
- stream: string;
46
- generate: string;
47
- generateObject: string;
48
- }>;
49
- }, "strip", z.ZodTypeAny, {
50
- workspace: string;
51
- discriminator: string;
52
- agentId: string;
53
- agentName: string;
54
- agentLink: string;
55
- callbacks: {
56
- stream: string;
57
- generate: string;
58
- generateObject: string;
59
- };
60
- }, {
61
- workspace: string;
62
- discriminator: string;
63
- agentId: string;
64
- agentName: string;
65
- agentLink: string;
66
- callbacks: {
67
- stream: string;
68
- generate: string;
69
- generateObject: string;
70
- };
71
- }>;
72
- declare const listChannelsSchema: z.ZodObject<{
73
- channels: z.ZodArray<z.ZodObject<{
74
- label: z.ZodString;
75
- value: z.ZodString;
76
- }, "strip", z.ZodTypeAny, {
77
- value: string;
78
- label: string;
79
- }, {
80
- value: string;
81
- label: string;
82
- }>, "many">;
83
- }, "strip", z.ZodTypeAny, {
84
- channels: {
85
- value: string;
86
- label: string;
87
- }[];
88
- }, {
89
- channels: {
90
- value: string;
91
- label: string;
92
- }[];
93
- }>;
94
- type Callbacks = z.infer<typeof callbacksSchema>;
95
- type JoinedChannelPayload = z.infer<typeof joinChannelSchema>;
96
- type ListChannelsSchema = z.infer<typeof listChannelsSchema>;
97
- declare const CHANNEL_BINDING: readonly [{
98
- readonly name: "DECO_CHAT_CHANNELS_JOIN";
99
- readonly inputSchema: z.ZodObject<{
100
- workspace: z.ZodString;
101
- discriminator: z.ZodString;
102
- } & {
103
- agentId: z.ZodString;
104
- agentName: z.ZodString;
105
- agentLink: z.ZodString;
106
- } & {
107
- callbacks: z.ZodObject<{
108
- stream: z.ZodString;
109
- generate: z.ZodString;
110
- generateObject: z.ZodString;
111
- }, "strip", z.ZodTypeAny, {
112
- stream: string;
113
- generate: string;
114
- generateObject: string;
115
- }, {
116
- stream: string;
117
- generate: string;
118
- generateObject: string;
119
- }>;
120
- }, "strip", z.ZodTypeAny, {
121
- workspace: string;
122
- discriminator: string;
123
- agentId: string;
124
- agentName: string;
125
- agentLink: string;
126
- callbacks: {
127
- stream: string;
128
- generate: string;
129
- generateObject: string;
130
- };
131
- }, {
132
- workspace: string;
133
- discriminator: string;
134
- agentId: string;
135
- agentName: string;
136
- agentLink: string;
137
- callbacks: {
138
- stream: string;
139
- generate: string;
140
- generateObject: string;
141
- };
142
- }>;
143
- readonly outputSchema: z.ZodAny;
144
- }, {
145
- readonly name: "DECO_CHAT_CHANNELS_LEAVE";
146
- readonly inputSchema: z.ZodObject<{
147
- workspace: z.ZodString;
148
- discriminator: z.ZodString;
149
- }, "strip", z.ZodTypeAny, {
150
- workspace: string;
151
- discriminator: string;
152
- }, {
153
- workspace: string;
154
- discriminator: string;
155
- }>;
156
- readonly outputSchema: z.ZodAny;
157
- }, {
158
- readonly name: "DECO_CHAT_CHANNELS_LIST";
159
- readonly inputSchema: z.ZodAny;
160
- readonly outputSchema: z.ZodObject<{
161
- channels: z.ZodArray<z.ZodObject<{
162
- label: z.ZodString;
163
- value: z.ZodString;
164
- }, "strip", z.ZodTypeAny, {
165
- value: string;
166
- label: string;
167
- }, {
168
- value: string;
169
- label: string;
170
- }>, "many">;
171
- }, "strip", z.ZodTypeAny, {
172
- channels: {
173
- value: string;
174
- label: string;
175
- }[];
176
- }, {
177
- channels: {
178
- value: string;
179
- label: string;
180
- }[];
181
- }>;
182
- readonly opt: true;
183
- }];
184
-
185
- interface ToolLike<TName extends string = string, TInput = any, TReturn extends object | null | boolean = object> {
186
- name: TName;
187
- description: string;
188
- inputSchema: z.ZodType<TInput>;
189
- outputSchema?: z.ZodType<TReturn>;
190
- handler: (props: TInput) => Promise<TReturn> | TReturn;
191
- }
192
- type Binder<TDefinition extends readonly ToolBinder[] = readonly ToolBinder[]> = TDefinition;
193
- type BinderImplementation<TBinder extends Binder<any>, TContext = any> = TBinder extends Binder<infer TDefinition> ? {
194
- [K in keyof TDefinition]: Omit<ToolLike<TDefinition[K]["name"], z.infer<TDefinition[K]["inputSchema"]>, TDefinition[K] extends {
195
- outputSchema: infer Schema;
196
- } ? Schema extends z.ZodType ? z.infer<Schema> : never : never>, "name" | "inputSchema" | "outputSchema" | "handler"> & {
197
- handler: (props: z.infer<TDefinition[K]["inputSchema"]>, c?: TContext) => ReturnType<ToolLike<TDefinition[K]["name"], z.infer<TDefinition[K]["inputSchema"]>, TDefinition[K] extends {
198
- outputSchema: infer Schema;
199
- } ? Schema extends z.ZodType ? z.infer<Schema> : never : never>["handler"]>;
200
- };
201
- } : never;
202
- declare const bindingClient: <TDefinition extends readonly ToolBinder[]>(binder: TDefinition) => {
203
- implements: (tools: ToolBinder[]) => boolean;
204
- forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<TDefinition>;
205
- };
206
- type MCPBindingClient<T extends ReturnType<typeof bindingClient>> = ReturnType<T["forConnection"]>;
207
- declare const ChannelBinding: {
208
- implements: (tools: ToolBinder[]) => boolean;
209
- forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<readonly [{
210
- readonly name: "DECO_CHAT_CHANNELS_JOIN";
211
- readonly inputSchema: z.ZodObject<{
212
- workspace: z.ZodString;
213
- discriminator: z.ZodString;
214
- } & {
215
- agentId: z.ZodString;
216
- agentName: z.ZodString;
217
- agentLink: z.ZodString;
218
- } & {
219
- callbacks: z.ZodObject<{
220
- stream: z.ZodString;
221
- generate: z.ZodString;
222
- generateObject: z.ZodString;
223
- }, "strip", z.ZodTypeAny, {
224
- stream: string;
225
- generate: string;
226
- generateObject: string;
227
- }, {
228
- stream: string;
229
- generate: string;
230
- generateObject: string;
231
- }>;
232
- }, "strip", z.ZodTypeAny, {
233
- workspace: string;
234
- discriminator: string;
235
- agentId: string;
236
- agentName: string;
237
- agentLink: string;
238
- callbacks: {
239
- stream: string;
240
- generate: string;
241
- generateObject: string;
242
- };
243
- }, {
244
- workspace: string;
245
- discriminator: string;
246
- agentId: string;
247
- agentName: string;
248
- agentLink: string;
249
- callbacks: {
250
- stream: string;
251
- generate: string;
252
- generateObject: string;
253
- };
254
- }>;
255
- readonly outputSchema: z.ZodAny;
256
- }, {
257
- readonly name: "DECO_CHAT_CHANNELS_LEAVE";
258
- readonly inputSchema: z.ZodObject<{
259
- workspace: z.ZodString;
260
- discriminator: z.ZodString;
261
- }, "strip", z.ZodTypeAny, {
262
- workspace: string;
263
- discriminator: string;
264
- }, {
265
- workspace: string;
266
- discriminator: string;
267
- }>;
268
- readonly outputSchema: z.ZodAny;
269
- }, {
270
- readonly name: "DECO_CHAT_CHANNELS_LIST";
271
- readonly inputSchema: z.ZodAny;
272
- readonly outputSchema: z.ZodObject<{
273
- channels: z.ZodArray<z.ZodObject<{
274
- label: z.ZodString;
275
- value: z.ZodString;
276
- }, "strip", z.ZodTypeAny, {
277
- value: string;
278
- label: string;
279
- }, {
280
- value: string;
281
- label: string;
282
- }>, "many">;
283
- }, "strip", z.ZodTypeAny, {
284
- channels: {
285
- value: string;
286
- label: string;
287
- }[];
288
- }, {
289
- channels: {
290
- value: string;
291
- label: string;
292
- }[];
293
- }>;
294
- readonly opt: true;
295
- }]>;
296
- };
297
- declare const ViewBinding: {
298
- implements: (tools: ToolBinder[]) => boolean;
299
- forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<readonly [{
300
- readonly name: "DECO_CHAT_VIEWS_LIST";
301
- readonly inputSchema: z.ZodAny;
302
- readonly outputSchema: z.ZodObject<{
303
- views: z.ZodArray<z.ZodObject<{
304
- id: z.ZodOptional<z.ZodString>;
305
- name: z.ZodOptional<z.ZodString>;
306
- title: z.ZodString;
307
- description: z.ZodOptional<z.ZodString>;
308
- icon: z.ZodString;
309
- url: z.ZodOptional<z.ZodString>;
310
- mimeTypePattern: z.ZodOptional<z.ZodString>;
311
- resourceName: z.ZodOptional<z.ZodString>;
312
- tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
313
- prompt: z.ZodOptional<z.ZodString>;
314
- installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
315
- }, "strip", z.ZodTypeAny, {
316
- tools: string[];
317
- title: string;
318
- icon: string;
319
- id?: string | undefined;
320
- name?: string | undefined;
321
- url?: string | undefined;
322
- description?: string | undefined;
323
- resourceName?: string | undefined;
324
- mimeTypePattern?: string | undefined;
325
- prompt?: string | undefined;
326
- installBehavior?: "open" | "none" | "autoPin" | undefined;
327
- }, {
328
- title: string;
329
- icon: string;
330
- id?: string | undefined;
331
- name?: string | undefined;
332
- url?: string | undefined;
333
- description?: string | undefined;
334
- resourceName?: string | undefined;
335
- tools?: string[] | undefined;
336
- mimeTypePattern?: string | undefined;
337
- prompt?: string | undefined;
338
- installBehavior?: "open" | "none" | "autoPin" | undefined;
339
- }>, "many">;
340
- }, "strip", z.ZodTypeAny, {
341
- views: {
342
- tools: string[];
343
- title: string;
344
- icon: string;
345
- id?: string | undefined;
346
- name?: string | undefined;
347
- url?: string | undefined;
348
- description?: string | undefined;
349
- resourceName?: string | undefined;
350
- mimeTypePattern?: string | undefined;
351
- prompt?: string | undefined;
352
- installBehavior?: "open" | "none" | "autoPin" | undefined;
353
- }[];
354
- }, {
355
- views: {
356
- title: string;
357
- icon: string;
358
- id?: string | undefined;
359
- name?: string | undefined;
360
- url?: string | undefined;
361
- description?: string | undefined;
362
- resourceName?: string | undefined;
363
- tools?: string[] | undefined;
364
- mimeTypePattern?: string | undefined;
365
- prompt?: string | undefined;
366
- installBehavior?: "open" | "none" | "autoPin" | undefined;
367
- }[];
368
- }>;
369
- }]>;
370
- };
371
-
372
- declare const impl: <TBinder extends Binder>(schema: TBinder, implementation: BinderImplementation<TBinder>, createToolFn?: typeof createPrivateTool, createStreamableToolFn?: typeof createStreamableTool) => (StreamableTool<z.ZodType<any, z.ZodTypeDef, any>> | _mastra_core.Tool<z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any> | undefined, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, _mastra_core.ToolExecutionContext<z.ZodType<any, z.ZodTypeDef, any>, any, any>>)[];
373
-
374
- declare const Binding: <TDefinition extends readonly ToolBinder[]>(binderTools: TDefinition) => {
375
- isImplementedBy: (tools: Pick<ToolBinder, "name">[]) => boolean;
376
- };
377
-
378
- declare const VIEW_BINDING: readonly [{
379
- readonly name: "DECO_CHAT_VIEWS_LIST";
380
- readonly inputSchema: z.ZodAny;
381
- readonly outputSchema: z.ZodObject<{
382
- views: z.ZodArray<z.ZodObject<{
383
- id: z.ZodOptional<z.ZodString>;
384
- name: z.ZodOptional<z.ZodString>;
385
- title: z.ZodString;
386
- description: z.ZodOptional<z.ZodString>;
387
- icon: z.ZodString;
388
- url: z.ZodOptional<z.ZodString>;
389
- mimeTypePattern: z.ZodOptional<z.ZodString>;
390
- resourceName: z.ZodOptional<z.ZodString>;
391
- tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
392
- prompt: z.ZodOptional<z.ZodString>;
393
- installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
394
- }, "strip", z.ZodTypeAny, {
395
- tools: string[];
396
- title: string;
397
- icon: string;
398
- id?: string | undefined;
399
- name?: string | undefined;
400
- url?: string | undefined;
401
- description?: string | undefined;
402
- resourceName?: string | undefined;
403
- mimeTypePattern?: string | undefined;
404
- prompt?: string | undefined;
405
- installBehavior?: "open" | "none" | "autoPin" | undefined;
406
- }, {
407
- title: string;
408
- icon: string;
409
- id?: string | undefined;
410
- name?: string | undefined;
411
- url?: string | undefined;
412
- description?: string | undefined;
413
- resourceName?: string | undefined;
414
- tools?: string[] | undefined;
415
- mimeTypePattern?: string | undefined;
416
- prompt?: string | undefined;
417
- installBehavior?: "open" | "none" | "autoPin" | undefined;
418
- }>, "many">;
419
- }, "strip", z.ZodTypeAny, {
420
- views: {
421
- tools: string[];
422
- title: string;
423
- icon: string;
424
- id?: string | undefined;
425
- name?: string | undefined;
426
- url?: string | undefined;
427
- description?: string | undefined;
428
- resourceName?: string | undefined;
429
- mimeTypePattern?: string | undefined;
430
- prompt?: string | undefined;
431
- installBehavior?: "open" | "none" | "autoPin" | undefined;
432
- }[];
433
- }, {
434
- views: {
435
- title: string;
436
- icon: string;
437
- id?: string | undefined;
438
- name?: string | undefined;
439
- url?: string | undefined;
440
- description?: string | undefined;
441
- resourceName?: string | undefined;
442
- tools?: string[] | undefined;
443
- mimeTypePattern?: string | undefined;
444
- prompt?: string | undefined;
445
- installBehavior?: "open" | "none" | "autoPin" | undefined;
446
- }[];
447
- }>;
448
- }];
449
- declare const listViewsSchema: z.ZodObject<{
450
- views: z.ZodArray<z.ZodObject<{
451
- id: z.ZodOptional<z.ZodString>;
452
- name: z.ZodOptional<z.ZodString>;
453
- title: z.ZodString;
454
- description: z.ZodOptional<z.ZodString>;
455
- icon: z.ZodString;
456
- url: z.ZodOptional<z.ZodString>;
457
- mimeTypePattern: z.ZodOptional<z.ZodString>;
458
- resourceName: z.ZodOptional<z.ZodString>;
459
- tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
460
- prompt: z.ZodOptional<z.ZodString>;
461
- installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
462
- }, "strip", z.ZodTypeAny, {
463
- tools: string[];
464
- title: string;
465
- icon: string;
466
- id?: string | undefined;
467
- name?: string | undefined;
468
- url?: string | undefined;
469
- description?: string | undefined;
470
- resourceName?: string | undefined;
471
- mimeTypePattern?: string | undefined;
472
- prompt?: string | undefined;
473
- installBehavior?: "open" | "none" | "autoPin" | undefined;
474
- }, {
475
- title: string;
476
- icon: string;
477
- id?: string | undefined;
478
- name?: string | undefined;
479
- url?: string | undefined;
480
- description?: string | undefined;
481
- resourceName?: string | undefined;
482
- tools?: string[] | undefined;
483
- mimeTypePattern?: string | undefined;
484
- prompt?: string | undefined;
485
- installBehavior?: "open" | "none" | "autoPin" | undefined;
486
- }>, "many">;
487
- }, "strip", z.ZodTypeAny, {
488
- views: {
489
- tools: string[];
490
- title: string;
491
- icon: string;
492
- id?: string | undefined;
493
- name?: string | undefined;
494
- url?: string | undefined;
495
- description?: string | undefined;
496
- resourceName?: string | undefined;
497
- mimeTypePattern?: string | undefined;
498
- prompt?: string | undefined;
499
- installBehavior?: "open" | "none" | "autoPin" | undefined;
500
- }[];
501
- }, {
502
- views: {
503
- title: string;
504
- icon: string;
505
- id?: string | undefined;
506
- name?: string | undefined;
507
- url?: string | undefined;
508
- description?: string | undefined;
509
- resourceName?: string | undefined;
510
- tools?: string[] | undefined;
511
- mimeTypePattern?: string | undefined;
512
- prompt?: string | undefined;
513
- installBehavior?: "open" | "none" | "autoPin" | undefined;
514
- }[];
515
- }>;
516
-
517
- /**
518
- * Resources 2.0 Schemas
519
- *
520
- * This module provides standardized schemas for Resources 2.0, a major version upgrade
521
- * that introduces standardized resource management with `rsc://` URI format and
522
- * consistent CRUD operations across all resource types.
523
- *
524
- * Key Features:
525
- * - Standardized `rsc://` URI format for all resources
526
- * - Generic CRUD operation schemas that work with any resource type
527
- * - Type-safe factory functions for creating resource-specific schemas
528
- * - Comprehensive validation and error handling
529
- * - Full TypeScript support with Zod validation
530
- */
531
- declare const ResourceUriSchema: z.ZodString;
532
- declare const DescribeInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
533
- declare const DescribeOutputSchema: z.ZodObject<{
534
- uriTemplate: z.ZodString;
535
- features: z.ZodObject<{
536
- watch: z.ZodObject<{
537
- pathname: z.ZodString;
538
- }, "strip", z.ZodTypeAny, {
539
- pathname: string;
540
- }, {
541
- pathname: string;
542
- }>;
543
- }, "strip", z.ZodTypeAny, {
544
- watch: {
545
- pathname: string;
546
- };
547
- }, {
548
- watch: {
549
- pathname: string;
550
- };
551
- }>;
552
- }, "strip", z.ZodTypeAny, {
553
- uriTemplate: string;
554
- features: {
555
- watch: {
556
- pathname: string;
557
- };
558
- };
559
- }, {
560
- uriTemplate: string;
561
- features: {
562
- watch: {
563
- pathname: string;
564
- };
565
- };
566
- }>;
567
- /**
568
- * Search input schema for resource queries
569
- * Supports pagination, filtering, sorting, and search terms
570
- */
571
- declare const SearchInputSchema: z.ZodObject<{
572
- term: z.ZodOptional<z.ZodString>;
573
- page: z.ZodDefault<z.ZodNumber>;
574
- pageSize: z.ZodDefault<z.ZodNumber>;
575
- filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
576
- sortBy: z.ZodOptional<z.ZodString>;
577
- sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
578
- }, "strip", z.ZodTypeAny, {
579
- page: number;
580
- pageSize: number;
581
- sortOrder: "asc" | "desc";
582
- filters?: Record<string, any> | undefined;
583
- term?: string | undefined;
584
- sortBy?: string | undefined;
585
- }, {
586
- filters?: Record<string, any> | undefined;
587
- term?: string | undefined;
588
- page?: number | undefined;
589
- pageSize?: number | undefined;
590
- sortBy?: string | undefined;
591
- sortOrder?: "asc" | "desc" | undefined;
592
- }>;
593
- /**
594
- * Factory function to create search output schema for a specific resource type
595
- * @param itemSchema - The schema for individual resource items
596
- * @returns Zod schema for search results with pagination metadata
597
- */
598
- declare function createSearchOutputSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
599
- items: z.ZodArray<T, "many">;
600
- totalCount: z.ZodNumber;
601
- page: z.ZodNumber;
602
- pageSize: z.ZodNumber;
603
- totalPages: z.ZodNumber;
604
- hasNextPage: z.ZodBoolean;
605
- hasPreviousPage: z.ZodBoolean;
606
- }, "strip", z.ZodTypeAny, {
607
- items: T["_output"][];
608
- page: number;
609
- pageSize: number;
610
- totalCount: number;
611
- totalPages: number;
612
- hasNextPage: boolean;
613
- hasPreviousPage: boolean;
614
- }, {
615
- items: T["_input"][];
616
- page: number;
617
- pageSize: number;
618
- totalCount: number;
619
- totalPages: number;
620
- hasNextPage: boolean;
621
- hasPreviousPage: boolean;
622
- }>;
623
- /**
624
- * Read input schema for retrieving a single resource
625
- */
626
- declare const ReadInputSchema: z.ZodObject<{
627
- uri: z.ZodString;
628
- }, "strip", z.ZodTypeAny, {
629
- uri: string;
630
- }, {
631
- uri: string;
632
- }>;
633
- /**
634
- * Factory function to create read output schema for a specific resource type
635
- * @param dataSchema - The schema for the resource data
636
- * @returns Zod schema for read operation results
637
- */
638
- declare function createReadOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
639
- uri: z.ZodString;
640
- data: T;
641
- created_at: z.ZodOptional<z.ZodString>;
642
- updated_at: z.ZodOptional<z.ZodString>;
643
- created_by: z.ZodOptional<z.ZodString>;
644
- updated_by: z.ZodOptional<z.ZodString>;
645
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
646
- uri: z.ZodString;
647
- data: T;
648
- created_at: z.ZodOptional<z.ZodString>;
649
- updated_at: z.ZodOptional<z.ZodString>;
650
- created_by: z.ZodOptional<z.ZodString>;
651
- updated_by: z.ZodOptional<z.ZodString>;
652
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
653
- uri: z.ZodString;
654
- data: T;
655
- created_at: z.ZodOptional<z.ZodString>;
656
- updated_at: z.ZodOptional<z.ZodString>;
657
- created_by: z.ZodOptional<z.ZodString>;
658
- updated_by: z.ZodOptional<z.ZodString>;
659
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
660
- /**
661
- * Factory function to create create input schema for a specific resource type
662
- * @param dataSchema - The schema for the resource data to create
663
- * @returns Zod schema for create operation input
664
- */
665
- declare function createCreateInputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
666
- data: T;
667
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
668
- data: T;
669
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
670
- data: T;
671
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
672
- /**
673
- * Factory function to create create output schema for a specific resource type
674
- * @param dataSchema - The schema for the created resource data
675
- * @returns Zod schema for create operation results
676
- */
677
- declare function createCreateOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
678
- uri: z.ZodString;
679
- data: T;
680
- created_at: z.ZodOptional<z.ZodString>;
681
- updated_at: z.ZodOptional<z.ZodString>;
682
- created_by: z.ZodOptional<z.ZodString>;
683
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
684
- uri: z.ZodString;
685
- data: T;
686
- created_at: z.ZodOptional<z.ZodString>;
687
- updated_at: z.ZodOptional<z.ZodString>;
688
- created_by: z.ZodOptional<z.ZodString>;
689
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
690
- uri: z.ZodString;
691
- data: T;
692
- created_at: z.ZodOptional<z.ZodString>;
693
- updated_at: z.ZodOptional<z.ZodString>;
694
- created_by: z.ZodOptional<z.ZodString>;
695
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
696
- /**
697
- * Factory function to create update input schema for a specific resource type
698
- * @param dataSchema - The schema for the resource data to update
699
- * @returns Zod schema for update operation input
700
- */
701
- declare function createUpdateInputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
702
- uri: z.ZodString;
703
- data: T;
704
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
705
- uri: z.ZodString;
706
- data: T;
707
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
708
- uri: z.ZodString;
709
- data: T;
710
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
711
- /**
712
- * Factory function to create update output schema for a specific resource type
713
- * @param dataSchema - The schema for the updated resource data
714
- * @returns Zod schema for update operation results
715
- */
716
- declare function createUpdateOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
717
- uri: z.ZodString;
718
- data: T;
719
- created_at: z.ZodOptional<z.ZodString>;
720
- updated_at: z.ZodOptional<z.ZodString>;
721
- created_by: z.ZodOptional<z.ZodString>;
722
- updated_by: z.ZodOptional<z.ZodString>;
723
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
724
- uri: z.ZodString;
725
- data: T;
726
- created_at: z.ZodOptional<z.ZodString>;
727
- updated_at: z.ZodOptional<z.ZodString>;
728
- created_by: z.ZodOptional<z.ZodString>;
729
- updated_by: z.ZodOptional<z.ZodString>;
730
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
731
- uri: z.ZodString;
732
- data: T;
733
- created_at: z.ZodOptional<z.ZodString>;
734
- updated_at: z.ZodOptional<z.ZodString>;
735
- created_by: z.ZodOptional<z.ZodString>;
736
- updated_by: z.ZodOptional<z.ZodString>;
737
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
738
- /**
739
- * Delete input schema for removing a resource
740
- */
741
- declare const DeleteInputSchema: z.ZodObject<{
742
- uri: z.ZodString;
743
- }, "strip", z.ZodTypeAny, {
744
- uri: string;
745
- }, {
746
- uri: string;
747
- }>;
748
- /**
749
- * Delete output schema for delete operation results
750
- */
751
- declare const DeleteOutputSchema: z.ZodObject<{
752
- success: z.ZodBoolean;
753
- uri: z.ZodString;
754
- }, "strip", z.ZodTypeAny, {
755
- success: boolean;
756
- uri: string;
757
- }, {
758
- success: boolean;
759
- uri: string;
760
- }>;
761
- /**
762
- * Factory function to create item schema for a specific resource type
763
- * This schema is used in search results and lists
764
- * @param dataSchema - The schema for the resource data
765
- * @returns Zod schema for resource items with metadata
766
- */
767
- declare function createItemSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
768
- uri: z.ZodString;
769
- data: z.ZodIntersection<z.ZodObject<{
770
- name: z.ZodString;
771
- description: z.ZodOptional<z.ZodString>;
772
- icon: z.ZodOptional<z.ZodString>;
773
- }, "strip", z.ZodTypeAny, {
774
- name: string;
775
- description?: string | undefined;
776
- icon?: string | undefined;
777
- }, {
778
- name: string;
779
- description?: string | undefined;
780
- icon?: string | undefined;
781
- }>, T>;
782
- created_at: z.ZodOptional<z.ZodString>;
783
- updated_at: z.ZodOptional<z.ZodString>;
784
- created_by: z.ZodOptional<z.ZodString>;
785
- updated_by: z.ZodOptional<z.ZodString>;
786
- }, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
787
- uri: z.ZodString;
788
- data: z.ZodIntersection<z.ZodObject<{
789
- name: z.ZodString;
790
- description: z.ZodOptional<z.ZodString>;
791
- icon: z.ZodOptional<z.ZodString>;
792
- }, "strip", z.ZodTypeAny, {
793
- name: string;
794
- description?: string | undefined;
795
- icon?: string | undefined;
796
- }, {
797
- name: string;
798
- description?: string | undefined;
799
- icon?: string | undefined;
800
- }>, T>;
801
- created_at: z.ZodOptional<z.ZodString>;
802
- updated_at: z.ZodOptional<z.ZodString>;
803
- created_by: z.ZodOptional<z.ZodString>;
804
- updated_by: z.ZodOptional<z.ZodString>;
805
- }>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
806
- uri: z.ZodString;
807
- data: z.ZodIntersection<z.ZodObject<{
808
- name: z.ZodString;
809
- description: z.ZodOptional<z.ZodString>;
810
- icon: z.ZodOptional<z.ZodString>;
811
- }, "strip", z.ZodTypeAny, {
812
- name: string;
813
- description?: string | undefined;
814
- icon?: string | undefined;
815
- }, {
816
- name: string;
817
- description?: string | undefined;
818
- icon?: string | undefined;
819
- }>, T>;
820
- created_at: z.ZodOptional<z.ZodString>;
821
- updated_at: z.ZodOptional<z.ZodString>;
822
- created_by: z.ZodOptional<z.ZodString>;
823
- updated_by: z.ZodOptional<z.ZodString>;
824
- }> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
825
- type SearchInput = z.infer<typeof SearchInputSchema>;
826
- type SearchOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createSearchOutputSchema<T>>>;
827
- type ReadInput = z.infer<typeof ReadInputSchema>;
828
- type ReadOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createReadOutputSchema<T>>>;
829
- type CreateInput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createCreateInputSchema<T>>>;
830
- type CreateOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createCreateOutputSchema<T>>>;
831
- type UpdateInput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createUpdateInputSchema<T>>>;
832
- type UpdateOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createUpdateOutputSchema<T>>>;
833
- type DeleteInput = z.infer<typeof DeleteInputSchema>;
834
- type DeleteOutput = z.infer<typeof DeleteOutputSchema>;
835
- type ResourceItem<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createItemSchema<T>>>;
836
-
837
- /**
838
- * Resources 2.0 Helper Functions
839
- *
840
- * This module provides helper functions for working with Resources 2.0
841
- * URI format and validation.
842
- *
843
- * Key Features:
844
- * - URI validation and parsing utilities
845
- * - URI construction helpers
846
- * - Type-safe resource URI handling
847
- */
848
- /**
849
- * Utility function to validate a resource URI format
850
- *
851
- * @param uri - The URI to validate
852
- * @returns True if the URI is valid, false otherwise
853
- */
854
- declare function validateResourceUri(uri: string): boolean;
855
- /**
856
- * Utility function to parse a resource URI into its components
857
- *
858
- * @param uri - The URI to parse
859
- * @returns Object containing the parsed components or null if invalid
860
- */
861
- declare function parseResourceUri(uri: string): {
862
- workspace: string;
863
- project: string;
864
- resourceId: string;
865
- } | null;
866
- /**
867
- * Utility function to construct a resource URI from components
868
- *
869
- * @param workspace - The workspace identifier
870
- * @param project - The project identifier
871
- * @param resourceId - The resource identifier
872
- * @returns The constructed resource URI
873
- */
874
- declare function constructResourceUri(workspace: string, project: string, resourceId: string): string;
875
-
876
- declare const normalizeDirectory: (dir: string) => string;
877
- declare const ResourcePath: {
878
- build: (directory: string, resourceId: string) => string;
879
- extract: (path: string) => {
880
- directory: string;
881
- resourceId: string;
882
- };
883
- };
884
- declare const ResourceUri: {
885
- build: (integrationId: string, resourceName: string, resourceId: string) => string;
886
- unwind: (uri: string) => {
887
- resourceName: string;
888
- resourceId: string;
889
- };
890
- };
891
- declare function getMetadataValue(metadata: unknown, key: string): unknown;
892
- declare function getMetadataString(metadata: unknown, key: string): string | undefined;
893
-
894
- declare function streamToResponse(stream: ReadableStream<LanguageModelV2StreamPart>, headers?: Record<string, string>): Response;
895
-
896
- declare const WellKnownBindings: {
897
- readonly Channel: readonly [{
898
- readonly name: "DECO_CHAT_CHANNELS_JOIN";
899
- readonly inputSchema: zod.ZodObject<{
900
- workspace: zod.ZodString;
901
- discriminator: zod.ZodString;
902
- } & {
903
- agentId: zod.ZodString;
904
- agentName: zod.ZodString;
905
- agentLink: zod.ZodString;
906
- } & {
907
- callbacks: zod.ZodObject<{
908
- stream: zod.ZodString;
909
- generate: zod.ZodString;
910
- generateObject: zod.ZodString;
911
- }, "strip", zod.ZodTypeAny, {
912
- stream: string;
913
- generate: string;
914
- generateObject: string;
915
- }, {
916
- stream: string;
917
- generate: string;
918
- generateObject: string;
919
- }>;
920
- }, "strip", zod.ZodTypeAny, {
921
- workspace: string;
922
- discriminator: string;
923
- agentId: string;
924
- agentName: string;
925
- agentLink: string;
926
- callbacks: {
927
- stream: string;
928
- generate: string;
929
- generateObject: string;
930
- };
931
- }, {
932
- workspace: string;
933
- discriminator: string;
934
- agentId: string;
935
- agentName: string;
936
- agentLink: string;
937
- callbacks: {
938
- stream: string;
939
- generate: string;
940
- generateObject: string;
941
- };
942
- }>;
943
- readonly outputSchema: zod.ZodAny;
944
- }, {
945
- readonly name: "DECO_CHAT_CHANNELS_LEAVE";
946
- readonly inputSchema: zod.ZodObject<{
947
- workspace: zod.ZodString;
948
- discriminator: zod.ZodString;
949
- }, "strip", zod.ZodTypeAny, {
950
- workspace: string;
951
- discriminator: string;
952
- }, {
953
- workspace: string;
954
- discriminator: string;
955
- }>;
956
- readonly outputSchema: zod.ZodAny;
957
- }, {
958
- readonly name: "DECO_CHAT_CHANNELS_LIST";
959
- readonly inputSchema: zod.ZodAny;
960
- readonly outputSchema: zod.ZodObject<{
961
- channels: zod.ZodArray<zod.ZodObject<{
962
- label: zod.ZodString;
963
- value: zod.ZodString;
964
- }, "strip", zod.ZodTypeAny, {
965
- value: string;
966
- label: string;
967
- }, {
968
- value: string;
969
- label: string;
970
- }>, "many">;
971
- }, "strip", zod.ZodTypeAny, {
972
- channels: {
973
- value: string;
974
- label: string;
975
- }[];
976
- }, {
977
- channels: {
978
- value: string;
979
- label: string;
980
- }[];
981
- }>;
982
- readonly opt: true;
983
- }];
984
- readonly View: readonly [{
985
- readonly name: "DECO_CHAT_VIEWS_LIST";
986
- readonly inputSchema: zod.ZodAny;
987
- readonly outputSchema: zod.ZodObject<{
988
- views: zod.ZodArray<zod.ZodObject<{
989
- id: zod.ZodOptional<zod.ZodString>;
990
- name: zod.ZodOptional<zod.ZodString>;
991
- title: zod.ZodString;
992
- description: zod.ZodOptional<zod.ZodString>;
993
- icon: zod.ZodString;
994
- url: zod.ZodOptional<zod.ZodString>;
995
- mimeTypePattern: zod.ZodOptional<zod.ZodString>;
996
- resourceName: zod.ZodOptional<zod.ZodString>;
997
- tools: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>>;
998
- prompt: zod.ZodOptional<zod.ZodString>;
999
- installBehavior: zod.ZodOptional<zod.ZodEnum<["none", "open", "autoPin"]>>;
1000
- }, "strip", zod.ZodTypeAny, {
1001
- title: string;
1002
- icon: string;
1003
- tools: string[];
1004
- id?: string | undefined;
1005
- name?: string | undefined;
1006
- description?: string | undefined;
1007
- url?: string | undefined;
1008
- mimeTypePattern?: string | undefined;
1009
- resourceName?: string | undefined;
1010
- prompt?: string | undefined;
1011
- installBehavior?: "none" | "open" | "autoPin" | undefined;
1012
- }, {
1013
- title: string;
1014
- icon: string;
1015
- id?: string | undefined;
1016
- name?: string | undefined;
1017
- description?: string | undefined;
1018
- url?: string | undefined;
1019
- mimeTypePattern?: string | undefined;
1020
- resourceName?: string | undefined;
1021
- tools?: string[] | undefined;
1022
- prompt?: string | undefined;
1023
- installBehavior?: "none" | "open" | "autoPin" | undefined;
1024
- }>, "many">;
1025
- }, "strip", zod.ZodTypeAny, {
1026
- views: {
1027
- title: string;
1028
- icon: string;
1029
- tools: string[];
1030
- id?: string | undefined;
1031
- name?: string | undefined;
1032
- description?: string | undefined;
1033
- url?: string | undefined;
1034
- mimeTypePattern?: string | undefined;
1035
- resourceName?: string | undefined;
1036
- prompt?: string | undefined;
1037
- installBehavior?: "none" | "open" | "autoPin" | undefined;
1038
- }[];
1039
- }, {
1040
- views: {
1041
- title: string;
1042
- icon: string;
1043
- id?: string | undefined;
1044
- name?: string | undefined;
1045
- description?: string | undefined;
1046
- url?: string | undefined;
1047
- mimeTypePattern?: string | undefined;
1048
- resourceName?: string | undefined;
1049
- tools?: string[] | undefined;
1050
- prompt?: string | undefined;
1051
- installBehavior?: "none" | "open" | "autoPin" | undefined;
1052
- }[];
1053
- }>;
1054
- }];
1055
- readonly LanguageModel: ({
1056
- name: "COLLECTION_LLM_LIST";
1057
- inputSchema: zod.ZodObject<{
1058
- where: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
1059
- field: zod.ZodArray<zod.ZodString, "many">;
1060
- operator: zod.ZodEnum<["eq", "gt", "gte", "lt", "lte", "in", "like", "contains"]>;
1061
- value: zod.ZodUnknown;
1062
- }, "strip", zod.ZodTypeAny, {
1063
- field: string[];
1064
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1065
- value?: unknown;
1066
- }, {
1067
- field: string[];
1068
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1069
- value?: unknown;
1070
- }>, zod.ZodObject<{
1071
- operator: zod.ZodEnum<["and", "or", "not"]>;
1072
- conditions: zod.ZodArray<zod.ZodObject<{
1073
- field: zod.ZodArray<zod.ZodString, "many">;
1074
- operator: zod.ZodEnum<["eq", "gt", "gte", "lt", "lte", "in", "like", "contains"]>;
1075
- value: zod.ZodUnknown;
1076
- }, "strip", zod.ZodTypeAny, {
1077
- field: string[];
1078
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1079
- value?: unknown;
1080
- }, {
1081
- field: string[];
1082
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1083
- value?: unknown;
1084
- }>, "many">;
1085
- }, "strip", zod.ZodTypeAny, {
1086
- operator: "and" | "or" | "not";
1087
- conditions: {
1088
- field: string[];
1089
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1090
- value?: unknown;
1091
- }[];
1092
- }, {
1093
- operator: "and" | "or" | "not";
1094
- conditions: {
1095
- field: string[];
1096
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1097
- value?: unknown;
1098
- }[];
1099
- }>]>>;
1100
- orderBy: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1101
- field: zod.ZodArray<zod.ZodString, "many">;
1102
- direction: zod.ZodEnum<["asc", "desc"]>;
1103
- nulls: zod.ZodOptional<zod.ZodEnum<["first", "last"]>>;
1104
- }, "strip", zod.ZodTypeAny, {
1105
- field: string[];
1106
- direction: "asc" | "desc";
1107
- nulls?: "first" | "last" | undefined;
1108
- }, {
1109
- field: string[];
1110
- direction: "asc" | "desc";
1111
- nulls?: "first" | "last" | undefined;
1112
- }>, "many">>;
1113
- limit: zod.ZodOptional<zod.ZodNumber>;
1114
- offset: zod.ZodOptional<zod.ZodNumber>;
1115
- }, "strip", zod.ZodTypeAny, {
1116
- where?: {
1117
- field: string[];
1118
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1119
- value?: unknown;
1120
- } | {
1121
- operator: "and" | "or" | "not";
1122
- conditions: {
1123
- field: string[];
1124
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1125
- value?: unknown;
1126
- }[];
1127
- } | undefined;
1128
- orderBy?: {
1129
- field: string[];
1130
- direction: "asc" | "desc";
1131
- nulls?: "first" | "last" | undefined;
1132
- }[] | undefined;
1133
- limit?: number | undefined;
1134
- offset?: number | undefined;
1135
- }, {
1136
- where?: {
1137
- field: string[];
1138
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1139
- value?: unknown;
1140
- } | {
1141
- operator: "and" | "or" | "not";
1142
- conditions: {
1143
- field: string[];
1144
- operator: "eq" | "gt" | "gte" | "lt" | "lte" | "in" | "like" | "contains";
1145
- value?: unknown;
1146
- }[];
1147
- } | undefined;
1148
- orderBy?: {
1149
- field: string[];
1150
- direction: "asc" | "desc";
1151
- nulls?: "first" | "last" | undefined;
1152
- }[] | undefined;
1153
- limit?: number | undefined;
1154
- offset?: number | undefined;
1155
- }>;
1156
- outputSchema: zod.ZodObject<{
1157
- items: zod.ZodArray<zod.ZodObject<{
1158
- id: zod.ZodString;
1159
- title: zod.ZodString;
1160
- created_at: zod.ZodString;
1161
- updated_at: zod.ZodString;
1162
- created_by: zod.ZodOptional<zod.ZodString>;
1163
- updated_by: zod.ZodOptional<zod.ZodString>;
1164
- } & {
1165
- logo: zod.ZodNullable<zod.ZodString>;
1166
- description: zod.ZodNullable<zod.ZodString>;
1167
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1168
- limits: zod.ZodNullable<zod.ZodObject<{
1169
- contextWindow: zod.ZodNumber;
1170
- maxOutputTokens: zod.ZodNumber;
1171
- }, "strip", zod.ZodTypeAny, {
1172
- maxOutputTokens: number;
1173
- contextWindow: number;
1174
- }, {
1175
- maxOutputTokens: number;
1176
- contextWindow: number;
1177
- }>>;
1178
- costs: zod.ZodNullable<zod.ZodObject<{
1179
- input: zod.ZodNumber;
1180
- output: zod.ZodNumber;
1181
- }, "strip", zod.ZodTypeAny, {
1182
- input: number;
1183
- output: number;
1184
- }, {
1185
- input: number;
1186
- output: number;
1187
- }>>;
1188
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1189
- }, "strip", zod.ZodTypeAny, {
1190
- description: string | null;
1191
- id: string;
1192
- logo: string | null;
1193
- capabilities: string[];
1194
- limits: {
1195
- maxOutputTokens: number;
1196
- contextWindow: number;
1197
- } | null;
1198
- costs: {
1199
- input: number;
1200
- output: number;
1201
- } | null;
1202
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1203
- title: string;
1204
- created_at: string;
1205
- updated_at: string;
1206
- created_by?: string | undefined;
1207
- updated_by?: string | undefined;
1208
- }, {
1209
- description: string | null;
1210
- id: string;
1211
- logo: string | null;
1212
- capabilities: string[];
1213
- limits: {
1214
- maxOutputTokens: number;
1215
- contextWindow: number;
1216
- } | null;
1217
- costs: {
1218
- input: number;
1219
- output: number;
1220
- } | null;
1221
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1222
- title: string;
1223
- created_at: string;
1224
- updated_at: string;
1225
- created_by?: string | undefined;
1226
- updated_by?: string | undefined;
1227
- }>, "many">;
1228
- totalCount: zod.ZodOptional<zod.ZodNumber>;
1229
- hasMore: zod.ZodOptional<zod.ZodBoolean>;
1230
- }, "strip", zod.ZodTypeAny, {
1231
- items: {
1232
- description: string | null;
1233
- id: string;
1234
- logo: string | null;
1235
- capabilities: string[];
1236
- limits: {
1237
- maxOutputTokens: number;
1238
- contextWindow: number;
1239
- } | null;
1240
- costs: {
1241
- input: number;
1242
- output: number;
1243
- } | null;
1244
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1245
- title: string;
1246
- created_at: string;
1247
- updated_at: string;
1248
- created_by?: string | undefined;
1249
- updated_by?: string | undefined;
1250
- }[];
1251
- totalCount?: number | undefined;
1252
- hasMore?: boolean | undefined;
1253
- }, {
1254
- items: {
1255
- description: string | null;
1256
- id: string;
1257
- logo: string | null;
1258
- capabilities: string[];
1259
- limits: {
1260
- maxOutputTokens: number;
1261
- contextWindow: number;
1262
- } | null;
1263
- costs: {
1264
- input: number;
1265
- output: number;
1266
- } | null;
1267
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1268
- title: string;
1269
- created_at: string;
1270
- updated_at: string;
1271
- created_by?: string | undefined;
1272
- updated_by?: string | undefined;
1273
- }[];
1274
- totalCount?: number | undefined;
1275
- hasMore?: boolean | undefined;
1276
- }>;
1277
- } | {
1278
- name: "COLLECTION_LLM_GET";
1279
- inputSchema: zod.ZodObject<{
1280
- id: zod.ZodString;
1281
- }, "strip", zod.ZodTypeAny, {
1282
- id: string;
1283
- }, {
1284
- id: string;
1285
- }>;
1286
- outputSchema: zod.ZodObject<{
1287
- item: zod.ZodNullable<zod.ZodObject<{
1288
- id: zod.ZodString;
1289
- title: zod.ZodString;
1290
- created_at: zod.ZodString;
1291
- updated_at: zod.ZodString;
1292
- created_by: zod.ZodOptional<zod.ZodString>;
1293
- updated_by: zod.ZodOptional<zod.ZodString>;
1294
- } & {
1295
- logo: zod.ZodNullable<zod.ZodString>;
1296
- description: zod.ZodNullable<zod.ZodString>;
1297
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1298
- limits: zod.ZodNullable<zod.ZodObject<{
1299
- contextWindow: zod.ZodNumber;
1300
- maxOutputTokens: zod.ZodNumber;
1301
- }, "strip", zod.ZodTypeAny, {
1302
- maxOutputTokens: number;
1303
- contextWindow: number;
1304
- }, {
1305
- maxOutputTokens: number;
1306
- contextWindow: number;
1307
- }>>;
1308
- costs: zod.ZodNullable<zod.ZodObject<{
1309
- input: zod.ZodNumber;
1310
- output: zod.ZodNumber;
1311
- }, "strip", zod.ZodTypeAny, {
1312
- input: number;
1313
- output: number;
1314
- }, {
1315
- input: number;
1316
- output: number;
1317
- }>>;
1318
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1319
- }, "strip", zod.ZodTypeAny, {
1320
- description: string | null;
1321
- id: string;
1322
- logo: string | null;
1323
- capabilities: string[];
1324
- limits: {
1325
- maxOutputTokens: number;
1326
- contextWindow: number;
1327
- } | null;
1328
- costs: {
1329
- input: number;
1330
- output: number;
1331
- } | null;
1332
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1333
- title: string;
1334
- created_at: string;
1335
- updated_at: string;
1336
- created_by?: string | undefined;
1337
- updated_by?: string | undefined;
1338
- }, {
1339
- description: string | null;
1340
- id: string;
1341
- logo: string | null;
1342
- capabilities: string[];
1343
- limits: {
1344
- maxOutputTokens: number;
1345
- contextWindow: number;
1346
- } | null;
1347
- costs: {
1348
- input: number;
1349
- output: number;
1350
- } | null;
1351
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1352
- title: string;
1353
- created_at: string;
1354
- updated_at: string;
1355
- created_by?: string | undefined;
1356
- updated_by?: string | undefined;
1357
- }>>;
1358
- }, "strip", zod.ZodTypeAny, {
1359
- item: {
1360
- description: string | null;
1361
- id: string;
1362
- logo: string | null;
1363
- capabilities: string[];
1364
- limits: {
1365
- maxOutputTokens: number;
1366
- contextWindow: number;
1367
- } | null;
1368
- costs: {
1369
- input: number;
1370
- output: number;
1371
- } | null;
1372
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1373
- title: string;
1374
- created_at: string;
1375
- updated_at: string;
1376
- created_by?: string | undefined;
1377
- updated_by?: string | undefined;
1378
- } | null;
1379
- }, {
1380
- item: {
1381
- description: string | null;
1382
- id: string;
1383
- logo: string | null;
1384
- capabilities: string[];
1385
- limits: {
1386
- maxOutputTokens: number;
1387
- contextWindow: number;
1388
- } | null;
1389
- costs: {
1390
- input: number;
1391
- output: number;
1392
- } | null;
1393
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1394
- title: string;
1395
- created_at: string;
1396
- updated_at: string;
1397
- created_by?: string | undefined;
1398
- updated_by?: string | undefined;
1399
- } | null;
1400
- }>;
1401
- } | {
1402
- name: "COLLECTION_LLM_CREATE";
1403
- inputSchema: zod.ZodObject<{
1404
- data: zod.ZodObject<{
1405
- id: zod.ZodString;
1406
- title: zod.ZodString;
1407
- created_at: zod.ZodString;
1408
- updated_at: zod.ZodString;
1409
- created_by: zod.ZodOptional<zod.ZodString>;
1410
- updated_by: zod.ZodOptional<zod.ZodString>;
1411
- } & {
1412
- logo: zod.ZodNullable<zod.ZodString>;
1413
- description: zod.ZodNullable<zod.ZodString>;
1414
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1415
- limits: zod.ZodNullable<zod.ZodObject<{
1416
- contextWindow: zod.ZodNumber;
1417
- maxOutputTokens: zod.ZodNumber;
1418
- }, "strip", zod.ZodTypeAny, {
1419
- maxOutputTokens: number;
1420
- contextWindow: number;
1421
- }, {
1422
- maxOutputTokens: number;
1423
- contextWindow: number;
1424
- }>>;
1425
- costs: zod.ZodNullable<zod.ZodObject<{
1426
- input: zod.ZodNumber;
1427
- output: zod.ZodNumber;
1428
- }, "strip", zod.ZodTypeAny, {
1429
- input: number;
1430
- output: number;
1431
- }, {
1432
- input: number;
1433
- output: number;
1434
- }>>;
1435
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1436
- }, "strip", zod.ZodTypeAny, {
1437
- description: string | null;
1438
- id: string;
1439
- logo: string | null;
1440
- capabilities: string[];
1441
- limits: {
1442
- maxOutputTokens: number;
1443
- contextWindow: number;
1444
- } | null;
1445
- costs: {
1446
- input: number;
1447
- output: number;
1448
- } | null;
1449
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1450
- title: string;
1451
- created_at: string;
1452
- updated_at: string;
1453
- created_by?: string | undefined;
1454
- updated_by?: string | undefined;
1455
- }, {
1456
- description: string | null;
1457
- id: string;
1458
- logo: string | null;
1459
- capabilities: string[];
1460
- limits: {
1461
- maxOutputTokens: number;
1462
- contextWindow: number;
1463
- } | null;
1464
- costs: {
1465
- input: number;
1466
- output: number;
1467
- } | null;
1468
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1469
- title: string;
1470
- created_at: string;
1471
- updated_at: string;
1472
- created_by?: string | undefined;
1473
- updated_by?: string | undefined;
1474
- }>;
1475
- }, "strip", zod.ZodTypeAny, {
1476
- data: {
1477
- description: string | null;
1478
- id: string;
1479
- logo: string | null;
1480
- capabilities: string[];
1481
- limits: {
1482
- maxOutputTokens: number;
1483
- contextWindow: number;
1484
- } | null;
1485
- costs: {
1486
- input: number;
1487
- output: number;
1488
- } | null;
1489
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1490
- title: string;
1491
- created_at: string;
1492
- updated_at: string;
1493
- created_by?: string | undefined;
1494
- updated_by?: string | undefined;
1495
- };
1496
- }, {
1497
- data: {
1498
- description: string | null;
1499
- id: string;
1500
- logo: string | null;
1501
- capabilities: string[];
1502
- limits: {
1503
- maxOutputTokens: number;
1504
- contextWindow: number;
1505
- } | null;
1506
- costs: {
1507
- input: number;
1508
- output: number;
1509
- } | null;
1510
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1511
- title: string;
1512
- created_at: string;
1513
- updated_at: string;
1514
- created_by?: string | undefined;
1515
- updated_by?: string | undefined;
1516
- };
1517
- }>;
1518
- outputSchema: zod.ZodObject<{
1519
- item: zod.ZodObject<{
1520
- id: zod.ZodString;
1521
- title: zod.ZodString;
1522
- created_at: zod.ZodString;
1523
- updated_at: zod.ZodString;
1524
- created_by: zod.ZodOptional<zod.ZodString>;
1525
- updated_by: zod.ZodOptional<zod.ZodString>;
1526
- } & {
1527
- logo: zod.ZodNullable<zod.ZodString>;
1528
- description: zod.ZodNullable<zod.ZodString>;
1529
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1530
- limits: zod.ZodNullable<zod.ZodObject<{
1531
- contextWindow: zod.ZodNumber;
1532
- maxOutputTokens: zod.ZodNumber;
1533
- }, "strip", zod.ZodTypeAny, {
1534
- maxOutputTokens: number;
1535
- contextWindow: number;
1536
- }, {
1537
- maxOutputTokens: number;
1538
- contextWindow: number;
1539
- }>>;
1540
- costs: zod.ZodNullable<zod.ZodObject<{
1541
- input: zod.ZodNumber;
1542
- output: zod.ZodNumber;
1543
- }, "strip", zod.ZodTypeAny, {
1544
- input: number;
1545
- output: number;
1546
- }, {
1547
- input: number;
1548
- output: number;
1549
- }>>;
1550
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1551
- }, "strip", zod.ZodTypeAny, {
1552
- description: string | null;
1553
- id: string;
1554
- logo: string | null;
1555
- capabilities: string[];
1556
- limits: {
1557
- maxOutputTokens: number;
1558
- contextWindow: number;
1559
- } | null;
1560
- costs: {
1561
- input: number;
1562
- output: number;
1563
- } | null;
1564
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1565
- title: string;
1566
- created_at: string;
1567
- updated_at: string;
1568
- created_by?: string | undefined;
1569
- updated_by?: string | undefined;
1570
- }, {
1571
- description: string | null;
1572
- id: string;
1573
- logo: string | null;
1574
- capabilities: string[];
1575
- limits: {
1576
- maxOutputTokens: number;
1577
- contextWindow: number;
1578
- } | null;
1579
- costs: {
1580
- input: number;
1581
- output: number;
1582
- } | null;
1583
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1584
- title: string;
1585
- created_at: string;
1586
- updated_at: string;
1587
- created_by?: string | undefined;
1588
- updated_by?: string | undefined;
1589
- }>;
1590
- }, "strip", zod.ZodTypeAny, {
1591
- item: {
1592
- description: string | null;
1593
- id: string;
1594
- logo: string | null;
1595
- capabilities: string[];
1596
- limits: {
1597
- maxOutputTokens: number;
1598
- contextWindow: number;
1599
- } | null;
1600
- costs: {
1601
- input: number;
1602
- output: number;
1603
- } | null;
1604
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1605
- title: string;
1606
- created_at: string;
1607
- updated_at: string;
1608
- created_by?: string | undefined;
1609
- updated_by?: string | undefined;
1610
- };
1611
- }, {
1612
- item: {
1613
- description: string | null;
1614
- id: string;
1615
- logo: string | null;
1616
- capabilities: string[];
1617
- limits: {
1618
- maxOutputTokens: number;
1619
- contextWindow: number;
1620
- } | null;
1621
- costs: {
1622
- input: number;
1623
- output: number;
1624
- } | null;
1625
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1626
- title: string;
1627
- created_at: string;
1628
- updated_at: string;
1629
- created_by?: string | undefined;
1630
- updated_by?: string | undefined;
1631
- };
1632
- }>;
1633
- opt: true;
1634
- } | {
1635
- name: "COLLECTION_LLM_UPDATE";
1636
- inputSchema: zod.ZodObject<{
1637
- id: zod.ZodString;
1638
- data: zod.ZodObject<{
1639
- [x: string]: zod.ZodOptional<any>;
1640
- }, any, any, {
1641
- [x: string]: any;
1642
- }, {
1643
- [x: string]: any;
1644
- }>;
1645
- }, "strip", zod.ZodTypeAny, {
1646
- id: string;
1647
- data: {
1648
- [x: string]: any;
1649
- };
1650
- }, {
1651
- id: string;
1652
- data: {
1653
- [x: string]: any;
1654
- };
1655
- }>;
1656
- outputSchema: zod.ZodObject<{
1657
- item: zod.ZodObject<{
1658
- id: zod.ZodString;
1659
- title: zod.ZodString;
1660
- created_at: zod.ZodString;
1661
- updated_at: zod.ZodString;
1662
- created_by: zod.ZodOptional<zod.ZodString>;
1663
- updated_by: zod.ZodOptional<zod.ZodString>;
1664
- } & {
1665
- logo: zod.ZodNullable<zod.ZodString>;
1666
- description: zod.ZodNullable<zod.ZodString>;
1667
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1668
- limits: zod.ZodNullable<zod.ZodObject<{
1669
- contextWindow: zod.ZodNumber;
1670
- maxOutputTokens: zod.ZodNumber;
1671
- }, "strip", zod.ZodTypeAny, {
1672
- maxOutputTokens: number;
1673
- contextWindow: number;
1674
- }, {
1675
- maxOutputTokens: number;
1676
- contextWindow: number;
1677
- }>>;
1678
- costs: zod.ZodNullable<zod.ZodObject<{
1679
- input: zod.ZodNumber;
1680
- output: zod.ZodNumber;
1681
- }, "strip", zod.ZodTypeAny, {
1682
- input: number;
1683
- output: number;
1684
- }, {
1685
- input: number;
1686
- output: number;
1687
- }>>;
1688
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1689
- }, "strip", zod.ZodTypeAny, {
1690
- description: string | null;
1691
- id: string;
1692
- logo: string | null;
1693
- capabilities: string[];
1694
- limits: {
1695
- maxOutputTokens: number;
1696
- contextWindow: number;
1697
- } | null;
1698
- costs: {
1699
- input: number;
1700
- output: number;
1701
- } | null;
1702
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1703
- title: string;
1704
- created_at: string;
1705
- updated_at: string;
1706
- created_by?: string | undefined;
1707
- updated_by?: string | undefined;
1708
- }, {
1709
- description: string | null;
1710
- id: string;
1711
- logo: string | null;
1712
- capabilities: string[];
1713
- limits: {
1714
- maxOutputTokens: number;
1715
- contextWindow: number;
1716
- } | null;
1717
- costs: {
1718
- input: number;
1719
- output: number;
1720
- } | null;
1721
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1722
- title: string;
1723
- created_at: string;
1724
- updated_at: string;
1725
- created_by?: string | undefined;
1726
- updated_by?: string | undefined;
1727
- }>;
1728
- }, "strip", zod.ZodTypeAny, {
1729
- item: {
1730
- description: string | null;
1731
- id: string;
1732
- logo: string | null;
1733
- capabilities: string[];
1734
- limits: {
1735
- maxOutputTokens: number;
1736
- contextWindow: number;
1737
- } | null;
1738
- costs: {
1739
- input: number;
1740
- output: number;
1741
- } | null;
1742
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1743
- title: string;
1744
- created_at: string;
1745
- updated_at: string;
1746
- created_by?: string | undefined;
1747
- updated_by?: string | undefined;
1748
- };
1749
- }, {
1750
- item: {
1751
- description: string | null;
1752
- id: string;
1753
- logo: string | null;
1754
- capabilities: string[];
1755
- limits: {
1756
- maxOutputTokens: number;
1757
- contextWindow: number;
1758
- } | null;
1759
- costs: {
1760
- input: number;
1761
- output: number;
1762
- } | null;
1763
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1764
- title: string;
1765
- created_at: string;
1766
- updated_at: string;
1767
- created_by?: string | undefined;
1768
- updated_by?: string | undefined;
1769
- };
1770
- }>;
1771
- opt: true;
1772
- } | {
1773
- name: "COLLECTION_LLM_DELETE";
1774
- inputSchema: zod.ZodObject<{
1775
- id: zod.ZodString;
1776
- }, "strip", zod.ZodTypeAny, {
1777
- id: string;
1778
- }, {
1779
- id: string;
1780
- }>;
1781
- outputSchema: zod.ZodObject<{
1782
- item: zod.ZodObject<{
1783
- id: zod.ZodString;
1784
- title: zod.ZodString;
1785
- created_at: zod.ZodString;
1786
- updated_at: zod.ZodString;
1787
- created_by: zod.ZodOptional<zod.ZodString>;
1788
- updated_by: zod.ZodOptional<zod.ZodString>;
1789
- } & {
1790
- logo: zod.ZodNullable<zod.ZodString>;
1791
- description: zod.ZodNullable<zod.ZodString>;
1792
- capabilities: zod.ZodArray<zod.ZodString, "many">;
1793
- limits: zod.ZodNullable<zod.ZodObject<{
1794
- contextWindow: zod.ZodNumber;
1795
- maxOutputTokens: zod.ZodNumber;
1796
- }, "strip", zod.ZodTypeAny, {
1797
- maxOutputTokens: number;
1798
- contextWindow: number;
1799
- }, {
1800
- maxOutputTokens: number;
1801
- contextWindow: number;
1802
- }>>;
1803
- costs: zod.ZodNullable<zod.ZodObject<{
1804
- input: zod.ZodNumber;
1805
- output: zod.ZodNumber;
1806
- }, "strip", zod.ZodTypeAny, {
1807
- input: number;
1808
- output: number;
1809
- }, {
1810
- input: number;
1811
- output: number;
1812
- }>>;
1813
- provider: zod.ZodNullable<zod.ZodEnum<["openai", "anthropic", "google", "xai", "deepseek", "openai-compatible", "openrouter"]>>;
1814
- }, "strip", zod.ZodTypeAny, {
1815
- description: string | null;
1816
- id: string;
1817
- logo: string | null;
1818
- capabilities: string[];
1819
- limits: {
1820
- maxOutputTokens: number;
1821
- contextWindow: number;
1822
- } | null;
1823
- costs: {
1824
- input: number;
1825
- output: number;
1826
- } | null;
1827
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1828
- title: string;
1829
- created_at: string;
1830
- updated_at: string;
1831
- created_by?: string | undefined;
1832
- updated_by?: string | undefined;
1833
- }, {
1834
- description: string | null;
1835
- id: string;
1836
- logo: string | null;
1837
- capabilities: string[];
1838
- limits: {
1839
- maxOutputTokens: number;
1840
- contextWindow: number;
1841
- } | null;
1842
- costs: {
1843
- input: number;
1844
- output: number;
1845
- } | null;
1846
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1847
- title: string;
1848
- created_at: string;
1849
- updated_at: string;
1850
- created_by?: string | undefined;
1851
- updated_by?: string | undefined;
1852
- }>;
1853
- }, "strip", zod.ZodTypeAny, {
1854
- item: {
1855
- description: string | null;
1856
- id: string;
1857
- logo: string | null;
1858
- capabilities: string[];
1859
- limits: {
1860
- maxOutputTokens: number;
1861
- contextWindow: number;
1862
- } | null;
1863
- costs: {
1864
- input: number;
1865
- output: number;
1866
- } | null;
1867
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1868
- title: string;
1869
- created_at: string;
1870
- updated_at: string;
1871
- created_by?: string | undefined;
1872
- updated_by?: string | undefined;
1873
- };
1874
- }, {
1875
- item: {
1876
- description: string | null;
1877
- id: string;
1878
- logo: string | null;
1879
- capabilities: string[];
1880
- limits: {
1881
- maxOutputTokens: number;
1882
- contextWindow: number;
1883
- } | null;
1884
- costs: {
1885
- input: number;
1886
- output: number;
1887
- } | null;
1888
- provider: "openai" | "anthropic" | "google" | "deepseek" | "openai-compatible" | "openrouter" | "xai" | null;
1889
- title: string;
1890
- created_at: string;
1891
- updated_at: string;
1892
- created_by?: string | undefined;
1893
- updated_by?: string | undefined;
1894
- };
1895
- }>;
1896
- opt: true;
1897
- } | {
1898
- name: "LLM_METADATA";
1899
- inputSchema: zod.ZodObject<{
1900
- modelId: zod.ZodString;
1901
- }, "strip", zod.ZodTypeAny, {
1902
- modelId: string;
1903
- }, {
1904
- modelId: string;
1905
- }>;
1906
- outputSchema: zod.ZodObject<{
1907
- supportedUrls: zod.ZodRecord<zod.ZodString, zod.ZodArray<zod.ZodString, "many">>;
1908
- }, "strip", zod.ZodTypeAny, {
1909
- supportedUrls: Record<string, string[]>;
1910
- }, {
1911
- supportedUrls: Record<string, string[]>;
1912
- }>;
1913
- streamable?: undefined;
1914
- } | {
1915
- name: "LLM_DO_STREAM";
1916
- inputSchema: zod.ZodObject<{
1917
- modelId: zod.ZodString;
1918
- callOptions: zod.ZodObject<{
1919
- prompt: zod.ZodAny;
1920
- maxOutputTokens: zod.ZodOptional<zod.ZodNumber>;
1921
- temperature: zod.ZodOptional<zod.ZodNumber>;
1922
- topP: zod.ZodOptional<zod.ZodNumber>;
1923
- topK: zod.ZodOptional<zod.ZodNumber>;
1924
- presencePenalty: zod.ZodOptional<zod.ZodNumber>;
1925
- frequencyPenalty: zod.ZodOptional<zod.ZodNumber>;
1926
- seed: zod.ZodOptional<zod.ZodNumber>;
1927
- stopSequences: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1928
- responseFormat: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
1929
- type: zod.ZodLiteral<"text">;
1930
- }, "strip", zod.ZodTypeAny, {
1931
- type: "text";
1932
- }, {
1933
- type: "text";
1934
- }>, zod.ZodObject<{
1935
- type: zod.ZodLiteral<"json">;
1936
- schema: zod.ZodOptional<zod.ZodAny>;
1937
- name: zod.ZodOptional<zod.ZodString>;
1938
- description: zod.ZodOptional<zod.ZodString>;
1939
- }, "strip", zod.ZodTypeAny, {
1940
- type: "json";
1941
- schema?: any;
1942
- name?: string | undefined;
1943
- description?: string | undefined;
1944
- }, {
1945
- type: "json";
1946
- schema?: any;
1947
- name?: string | undefined;
1948
- description?: string | undefined;
1949
- }>]>>;
1950
- tools: zod.ZodOptional<zod.ZodArray<zod.ZodAny, "many">>;
1951
- toolChoice: zod.ZodOptional<zod.ZodAny>;
1952
- includeRawChunks: zod.ZodOptional<zod.ZodBoolean>;
1953
- abortSignal: zod.ZodOptional<zod.ZodAny>;
1954
- headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodString, zod.ZodUndefined]>>>;
1955
- providerOptions: zod.ZodOptional<zod.ZodAny>;
1956
- }, "strip", zod.ZodTypeAny, {
1957
- prompt?: any;
1958
- maxOutputTokens?: number | undefined;
1959
- temperature?: number | undefined;
1960
- topP?: number | undefined;
1961
- topK?: number | undefined;
1962
- presencePenalty?: number | undefined;
1963
- frequencyPenalty?: number | undefined;
1964
- seed?: number | undefined;
1965
- stopSequences?: string[] | undefined;
1966
- responseFormat?: {
1967
- type: "text";
1968
- } | {
1969
- type: "json";
1970
- schema?: any;
1971
- name?: string | undefined;
1972
- description?: string | undefined;
1973
- } | undefined;
1974
- tools?: any[] | undefined;
1975
- toolChoice?: any;
1976
- includeRawChunks?: boolean | undefined;
1977
- abortSignal?: any;
1978
- headers?: Record<string, string | undefined> | undefined;
1979
- providerOptions?: any;
1980
- }, {
1981
- prompt?: any;
1982
- maxOutputTokens?: number | undefined;
1983
- temperature?: number | undefined;
1984
- topP?: number | undefined;
1985
- topK?: number | undefined;
1986
- presencePenalty?: number | undefined;
1987
- frequencyPenalty?: number | undefined;
1988
- seed?: number | undefined;
1989
- stopSequences?: string[] | undefined;
1990
- responseFormat?: {
1991
- type: "text";
1992
- } | {
1993
- type: "json";
1994
- schema?: any;
1995
- name?: string | undefined;
1996
- description?: string | undefined;
1997
- } | undefined;
1998
- tools?: any[] | undefined;
1999
- toolChoice?: any;
2000
- includeRawChunks?: boolean | undefined;
2001
- abortSignal?: any;
2002
- headers?: Record<string, string | undefined> | undefined;
2003
- providerOptions?: any;
2004
- }>;
2005
- }, "strip", zod.ZodTypeAny, {
2006
- modelId: string;
2007
- callOptions: {
2008
- prompt?: any;
2009
- maxOutputTokens?: number | undefined;
2010
- temperature?: number | undefined;
2011
- topP?: number | undefined;
2012
- topK?: number | undefined;
2013
- presencePenalty?: number | undefined;
2014
- frequencyPenalty?: number | undefined;
2015
- seed?: number | undefined;
2016
- stopSequences?: string[] | undefined;
2017
- responseFormat?: {
2018
- type: "text";
2019
- } | {
2020
- type: "json";
2021
- schema?: any;
2022
- name?: string | undefined;
2023
- description?: string | undefined;
2024
- } | undefined;
2025
- tools?: any[] | undefined;
2026
- toolChoice?: any;
2027
- includeRawChunks?: boolean | undefined;
2028
- abortSignal?: any;
2029
- headers?: Record<string, string | undefined> | undefined;
2030
- providerOptions?: any;
2031
- };
2032
- }, {
2033
- modelId: string;
2034
- callOptions: {
2035
- prompt?: any;
2036
- maxOutputTokens?: number | undefined;
2037
- temperature?: number | undefined;
2038
- topP?: number | undefined;
2039
- topK?: number | undefined;
2040
- presencePenalty?: number | undefined;
2041
- frequencyPenalty?: number | undefined;
2042
- seed?: number | undefined;
2043
- stopSequences?: string[] | undefined;
2044
- responseFormat?: {
2045
- type: "text";
2046
- } | {
2047
- type: "json";
2048
- schema?: any;
2049
- name?: string | undefined;
2050
- description?: string | undefined;
2051
- } | undefined;
2052
- tools?: any[] | undefined;
2053
- toolChoice?: any;
2054
- includeRawChunks?: boolean | undefined;
2055
- abortSignal?: any;
2056
- headers?: Record<string, string | undefined> | undefined;
2057
- providerOptions?: any;
2058
- };
2059
- }>;
2060
- streamable: true;
2061
- outputSchema?: undefined;
2062
- } | {
2063
- name: "LLM_DO_GENERATE";
2064
- inputSchema: zod.ZodObject<{
2065
- modelId: zod.ZodString;
2066
- callOptions: zod.ZodObject<{
2067
- prompt: zod.ZodAny;
2068
- maxOutputTokens: zod.ZodOptional<zod.ZodNumber>;
2069
- temperature: zod.ZodOptional<zod.ZodNumber>;
2070
- topP: zod.ZodOptional<zod.ZodNumber>;
2071
- topK: zod.ZodOptional<zod.ZodNumber>;
2072
- presencePenalty: zod.ZodOptional<zod.ZodNumber>;
2073
- frequencyPenalty: zod.ZodOptional<zod.ZodNumber>;
2074
- seed: zod.ZodOptional<zod.ZodNumber>;
2075
- stopSequences: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
2076
- responseFormat: zod.ZodOptional<zod.ZodUnion<[zod.ZodObject<{
2077
- type: zod.ZodLiteral<"text">;
2078
- }, "strip", zod.ZodTypeAny, {
2079
- type: "text";
2080
- }, {
2081
- type: "text";
2082
- }>, zod.ZodObject<{
2083
- type: zod.ZodLiteral<"json">;
2084
- schema: zod.ZodOptional<zod.ZodAny>;
2085
- name: zod.ZodOptional<zod.ZodString>;
2086
- description: zod.ZodOptional<zod.ZodString>;
2087
- }, "strip", zod.ZodTypeAny, {
2088
- type: "json";
2089
- schema?: any;
2090
- name?: string | undefined;
2091
- description?: string | undefined;
2092
- }, {
2093
- type: "json";
2094
- schema?: any;
2095
- name?: string | undefined;
2096
- description?: string | undefined;
2097
- }>]>>;
2098
- tools: zod.ZodOptional<zod.ZodArray<zod.ZodAny, "many">>;
2099
- toolChoice: zod.ZodOptional<zod.ZodAny>;
2100
- includeRawChunks: zod.ZodOptional<zod.ZodBoolean>;
2101
- abortSignal: zod.ZodOptional<zod.ZodAny>;
2102
- headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodUnion<[zod.ZodString, zod.ZodUndefined]>>>;
2103
- providerOptions: zod.ZodOptional<zod.ZodAny>;
2104
- }, "strip", zod.ZodTypeAny, {
2105
- prompt?: any;
2106
- maxOutputTokens?: number | undefined;
2107
- temperature?: number | undefined;
2108
- topP?: number | undefined;
2109
- topK?: number | undefined;
2110
- presencePenalty?: number | undefined;
2111
- frequencyPenalty?: number | undefined;
2112
- seed?: number | undefined;
2113
- stopSequences?: string[] | undefined;
2114
- responseFormat?: {
2115
- type: "text";
2116
- } | {
2117
- type: "json";
2118
- schema?: any;
2119
- name?: string | undefined;
2120
- description?: string | undefined;
2121
- } | undefined;
2122
- tools?: any[] | undefined;
2123
- toolChoice?: any;
2124
- includeRawChunks?: boolean | undefined;
2125
- abortSignal?: any;
2126
- headers?: Record<string, string | undefined> | undefined;
2127
- providerOptions?: any;
2128
- }, {
2129
- prompt?: any;
2130
- maxOutputTokens?: number | undefined;
2131
- temperature?: number | undefined;
2132
- topP?: number | undefined;
2133
- topK?: number | undefined;
2134
- presencePenalty?: number | undefined;
2135
- frequencyPenalty?: number | undefined;
2136
- seed?: number | undefined;
2137
- stopSequences?: string[] | undefined;
2138
- responseFormat?: {
2139
- type: "text";
2140
- } | {
2141
- type: "json";
2142
- schema?: any;
2143
- name?: string | undefined;
2144
- description?: string | undefined;
2145
- } | undefined;
2146
- tools?: any[] | undefined;
2147
- toolChoice?: any;
2148
- includeRawChunks?: boolean | undefined;
2149
- abortSignal?: any;
2150
- headers?: Record<string, string | undefined> | undefined;
2151
- providerOptions?: any;
2152
- }>;
2153
- }, "strip", zod.ZodTypeAny, {
2154
- modelId: string;
2155
- callOptions: {
2156
- prompt?: any;
2157
- maxOutputTokens?: number | undefined;
2158
- temperature?: number | undefined;
2159
- topP?: number | undefined;
2160
- topK?: number | undefined;
2161
- presencePenalty?: number | undefined;
2162
- frequencyPenalty?: number | undefined;
2163
- seed?: number | undefined;
2164
- stopSequences?: string[] | undefined;
2165
- responseFormat?: {
2166
- type: "text";
2167
- } | {
2168
- type: "json";
2169
- schema?: any;
2170
- name?: string | undefined;
2171
- description?: string | undefined;
2172
- } | undefined;
2173
- tools?: any[] | undefined;
2174
- toolChoice?: any;
2175
- includeRawChunks?: boolean | undefined;
2176
- abortSignal?: any;
2177
- headers?: Record<string, string | undefined> | undefined;
2178
- providerOptions?: any;
2179
- };
2180
- }, {
2181
- modelId: string;
2182
- callOptions: {
2183
- prompt?: any;
2184
- maxOutputTokens?: number | undefined;
2185
- temperature?: number | undefined;
2186
- topP?: number | undefined;
2187
- topK?: number | undefined;
2188
- presencePenalty?: number | undefined;
2189
- frequencyPenalty?: number | undefined;
2190
- seed?: number | undefined;
2191
- stopSequences?: string[] | undefined;
2192
- responseFormat?: {
2193
- type: "text";
2194
- } | {
2195
- type: "json";
2196
- schema?: any;
2197
- name?: string | undefined;
2198
- description?: string | undefined;
2199
- } | undefined;
2200
- tools?: any[] | undefined;
2201
- toolChoice?: any;
2202
- includeRawChunks?: boolean | undefined;
2203
- abortSignal?: any;
2204
- headers?: Record<string, string | undefined> | undefined;
2205
- providerOptions?: any;
2206
- };
2207
- }>;
2208
- outputSchema: zod.ZodObject<{
2209
- content: zod.ZodArray<zod.ZodAny, "many">;
2210
- finishReason: zod.ZodEnum<["stop", "length", "content-filter", "tool-calls", "error", "other", "unknown"]>;
2211
- usage: zod.ZodEffects<zod.ZodObject<{
2212
- inputTokens: zod.ZodOptional<zod.ZodNumber>;
2213
- outputTokens: zod.ZodOptional<zod.ZodNumber>;
2214
- totalTokens: zod.ZodOptional<zod.ZodNumber>;
2215
- reasoningTokens: zod.ZodOptional<zod.ZodNumber>;
2216
- }, "passthrough", zod.ZodTypeAny, zod.objectOutputType<{
2217
- inputTokens: zod.ZodOptional<zod.ZodNumber>;
2218
- outputTokens: zod.ZodOptional<zod.ZodNumber>;
2219
- totalTokens: zod.ZodOptional<zod.ZodNumber>;
2220
- reasoningTokens: zod.ZodOptional<zod.ZodNumber>;
2221
- }, zod.ZodTypeAny, "passthrough">, zod.objectInputType<{
2222
- inputTokens: zod.ZodOptional<zod.ZodNumber>;
2223
- outputTokens: zod.ZodOptional<zod.ZodNumber>;
2224
- totalTokens: zod.ZodOptional<zod.ZodNumber>;
2225
- reasoningTokens: zod.ZodOptional<zod.ZodNumber>;
2226
- }, zod.ZodTypeAny, "passthrough">>, {
2227
- inputTokens: number | undefined;
2228
- outputTokens: number | undefined;
2229
- totalTokens: number | undefined;
2230
- reasoningTokens: number | undefined;
2231
- }, zod.objectInputType<{
2232
- inputTokens: zod.ZodOptional<zod.ZodNumber>;
2233
- outputTokens: zod.ZodOptional<zod.ZodNumber>;
2234
- totalTokens: zod.ZodOptional<zod.ZodNumber>;
2235
- reasoningTokens: zod.ZodOptional<zod.ZodNumber>;
2236
- }, zod.ZodTypeAny, "passthrough">>;
2237
- providerMetadata: zod.ZodOptional<zod.ZodAny>;
2238
- request: zod.ZodOptional<zod.ZodObject<{
2239
- body: zod.ZodOptional<zod.ZodAny>;
2240
- }, "strip", zod.ZodTypeAny, {
2241
- body?: any;
2242
- }, {
2243
- body?: any;
2244
- }>>;
2245
- response: zod.ZodOptional<zod.ZodObject<{
2246
- id: zod.ZodOptional<zod.ZodString>;
2247
- timestamp: zod.ZodOptional<zod.ZodDate>;
2248
- modelId: zod.ZodOptional<zod.ZodString>;
2249
- headers: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
2250
- body: zod.ZodOptional<zod.ZodAny>;
2251
- }, "strip", zod.ZodTypeAny, {
2252
- headers?: Record<string, string> | undefined;
2253
- body?: any;
2254
- id?: string | undefined;
2255
- timestamp?: Date | undefined;
2256
- modelId?: string | undefined;
2257
- }, {
2258
- headers?: Record<string, string> | undefined;
2259
- body?: any;
2260
- id?: string | undefined;
2261
- timestamp?: Date | undefined;
2262
- modelId?: string | undefined;
2263
- }>>;
2264
- warnings: zod.ZodArray<zod.ZodAny, "many">;
2265
- }, "strip", zod.ZodTypeAny, {
2266
- content: any[];
2267
- finishReason: "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "error" | "other";
2268
- usage: {
2269
- inputTokens: number | undefined;
2270
- outputTokens: number | undefined;
2271
- totalTokens: number | undefined;
2272
- reasoningTokens: number | undefined;
2273
- };
2274
- warnings: any[];
2275
- providerMetadata?: any;
2276
- request?: {
2277
- body?: any;
2278
- } | undefined;
2279
- response?: {
2280
- headers?: Record<string, string> | undefined;
2281
- body?: any;
2282
- id?: string | undefined;
2283
- timestamp?: Date | undefined;
2284
- modelId?: string | undefined;
2285
- } | undefined;
2286
- }, {
2287
- content: any[];
2288
- finishReason: "length" | "unknown" | "stop" | "content-filter" | "tool-calls" | "error" | "other";
2289
- usage: {
2290
- inputTokens?: number | undefined;
2291
- outputTokens?: number | undefined;
2292
- totalTokens?: number | undefined;
2293
- reasoningTokens?: number | undefined;
2294
- } & {
2295
- [k: string]: unknown;
2296
- };
2297
- warnings: any[];
2298
- providerMetadata?: any;
2299
- request?: {
2300
- body?: any;
2301
- } | undefined;
2302
- response?: {
2303
- headers?: Record<string, string> | undefined;
2304
- body?: any;
2305
- id?: string | undefined;
2306
- timestamp?: Date | undefined;
2307
- modelId?: string | undefined;
2308
- } | undefined;
2309
- }>;
2310
- streamable?: undefined;
2311
- })[];
2312
- };
2313
- type WellKnownBindingsName = keyof typeof WellKnownBindings;
2314
-
2315
- export { type Binder, type BinderImplementation, Binding, CHANNEL_BINDING, type Callbacks, ChannelBinding, type CreateInput, type CreateOutput, type DeleteInput, DeleteInputSchema, type DeleteOutput, DeleteOutputSchema, DescribeInputSchema, DescribeOutputSchema, type JoinedChannelPayload, type ListChannelsSchema, type MCPBindingClient, type ReadInput, ReadInputSchema, type ReadOutput, type ResourceItem, ResourcePath, ResourceUri, ResourceUriSchema, type SearchInput, SearchInputSchema, type SearchOutput, type ToolLike, type UpdateInput, type UpdateOutput, VIEW_BINDING, ViewBinding, WellKnownBindings, type WellKnownBindingsName, bindingClient, constructResourceUri, createCreateInputSchema, createCreateOutputSchema, createItemSchema, createReadOutputSchema, createSearchOutputSchema, createUpdateInputSchema, createUpdateOutputSchema, getMetadataString as deconfigGetMetadataString, getMetadataValue as deconfigGetMetadataValue, normalizeDirectory as deconfigNormalizeDirectory, impl, listViewsSchema, parseResourceUri, streamToResponse, validateResourceUri };