@decocms/runtime 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin.d.ts +5 -0
- package/dist/admin.js +21 -0
- package/dist/admin.js.map +1 -0
- package/dist/bindings/deconfig/index.d.ts +10 -0
- package/dist/bindings/deconfig/index.js +10 -0
- package/dist/bindings/deconfig/index.js.map +1 -0
- package/dist/bindings/index.d.ts +1054 -0
- package/dist/bindings/index.js +133 -0
- package/dist/bindings/index.js.map +1 -0
- package/dist/chunk-377XXI4J.js +764 -0
- package/dist/chunk-377XXI4J.js.map +1 -0
- package/dist/chunk-4UQ5U73Y.js +129 -0
- package/dist/chunk-4UQ5U73Y.js.map +1 -0
- package/dist/chunk-4XSQKJLU.js +105 -0
- package/dist/chunk-4XSQKJLU.js.map +1 -0
- package/dist/chunk-73FIKR3X.js +128 -0
- package/dist/chunk-73FIKR3X.js.map +1 -0
- package/dist/chunk-AOFOWQXY.js +27 -0
- package/dist/chunk-AOFOWQXY.js.map +1 -0
- package/dist/chunk-G3NWZG2F.js +155 -0
- package/dist/chunk-G3NWZG2F.js.map +1 -0
- package/dist/chunk-I7BWSAN6.js +49 -0
- package/dist/chunk-I7BWSAN6.js.map +1 -0
- package/dist/chunk-UHR3BLMF.js +92 -0
- package/dist/chunk-UHR3BLMF.js.map +1 -0
- package/dist/chunk-ZPUT6RN6.js +32 -0
- package/dist/chunk-ZPUT6RN6.js.map +1 -0
- package/dist/chunk-ZRJ5SGAO.js +494 -0
- package/dist/chunk-ZRJ5SGAO.js.map +1 -0
- package/dist/client.d.ts +28 -0
- package/dist/client.js +5 -0
- package/dist/client.js.map +1 -0
- package/dist/connection-DDtQYrea.d.ts +30 -0
- package/dist/d1-store.d.ts +9 -0
- package/dist/d1-store.js +4 -0
- package/dist/d1-store.js.map +1 -0
- package/dist/drizzle.d.ts +48 -0
- package/dist/drizzle.js +121 -0
- package/dist/drizzle.js.map +1 -0
- package/dist/index-BBAR4TQu.d.ts +530 -0
- package/dist/index-D_J_044C.d.ts +461 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +634 -0
- package/dist/index.js.map +1 -0
- package/dist/mastra.d.ts +9 -0
- package/dist/mastra.js +6 -0
- package/dist/mastra.js.map +1 -0
- package/dist/mcp-Bv7IAgWX.d.ts +109 -0
- package/dist/mcp-client.d.ts +236 -0
- package/dist/mcp-client.js +4 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/proxy.d.ts +10 -0
- package/dist/proxy.js +5 -0
- package/dist/proxy.js.map +1 -0
- package/dist/resources.d.ts +393 -0
- package/dist/resources.js +4 -0
- package/dist/resources.js.map +1 -0
- package/dist/views.d.ts +72 -0
- package/dist/views.js +4 -0
- package/dist/views.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,1054 @@
|
|
|
1
|
+
import * as zod from 'zod';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
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-BBAR4TQu.js';
|
|
4
|
+
import * as _mastra_core from '@mastra/core';
|
|
5
|
+
import { M as MCPConnection } from '../connection-DDtQYrea.js';
|
|
6
|
+
import { c as createPrivateTool } from '../index-D_J_044C.js';
|
|
7
|
+
import { T as ToolBinder, M as MCPClientFetchStub } from '../mcp-Bv7IAgWX.js';
|
|
8
|
+
import '@cloudflare/workers-types';
|
|
9
|
+
import '@mastra/core/di';
|
|
10
|
+
import '@mastra/core/workflows';
|
|
11
|
+
import '../resources.js';
|
|
12
|
+
|
|
13
|
+
declare const callbacksSchema: z.ZodObject<{
|
|
14
|
+
stream: z.ZodString;
|
|
15
|
+
generate: z.ZodString;
|
|
16
|
+
generateObject: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
stream: string;
|
|
19
|
+
generate: string;
|
|
20
|
+
generateObject: string;
|
|
21
|
+
}, {
|
|
22
|
+
stream: string;
|
|
23
|
+
generate: string;
|
|
24
|
+
generateObject: string;
|
|
25
|
+
}>;
|
|
26
|
+
declare const joinChannelSchema: z.ZodObject<{
|
|
27
|
+
workspace: z.ZodString;
|
|
28
|
+
discriminator: z.ZodString;
|
|
29
|
+
} & {
|
|
30
|
+
agentId: z.ZodString;
|
|
31
|
+
agentName: z.ZodString;
|
|
32
|
+
agentLink: z.ZodString;
|
|
33
|
+
} & {
|
|
34
|
+
callbacks: z.ZodObject<{
|
|
35
|
+
stream: z.ZodString;
|
|
36
|
+
generate: z.ZodString;
|
|
37
|
+
generateObject: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
stream: string;
|
|
40
|
+
generate: string;
|
|
41
|
+
generateObject: string;
|
|
42
|
+
}, {
|
|
43
|
+
stream: string;
|
|
44
|
+
generate: string;
|
|
45
|
+
generateObject: string;
|
|
46
|
+
}>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
workspace: string;
|
|
49
|
+
discriminator: string;
|
|
50
|
+
agentId: string;
|
|
51
|
+
agentName: string;
|
|
52
|
+
agentLink: string;
|
|
53
|
+
callbacks: {
|
|
54
|
+
stream: string;
|
|
55
|
+
generate: string;
|
|
56
|
+
generateObject: string;
|
|
57
|
+
};
|
|
58
|
+
}, {
|
|
59
|
+
workspace: string;
|
|
60
|
+
discriminator: string;
|
|
61
|
+
agentId: string;
|
|
62
|
+
agentName: string;
|
|
63
|
+
agentLink: string;
|
|
64
|
+
callbacks: {
|
|
65
|
+
stream: string;
|
|
66
|
+
generate: string;
|
|
67
|
+
generateObject: string;
|
|
68
|
+
};
|
|
69
|
+
}>;
|
|
70
|
+
declare const listChannelsSchema: z.ZodObject<{
|
|
71
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
72
|
+
label: z.ZodString;
|
|
73
|
+
value: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
value: string;
|
|
76
|
+
label: string;
|
|
77
|
+
}, {
|
|
78
|
+
value: string;
|
|
79
|
+
label: string;
|
|
80
|
+
}>, "many">;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
channels: {
|
|
83
|
+
value: string;
|
|
84
|
+
label: string;
|
|
85
|
+
}[];
|
|
86
|
+
}, {
|
|
87
|
+
channels: {
|
|
88
|
+
value: string;
|
|
89
|
+
label: string;
|
|
90
|
+
}[];
|
|
91
|
+
}>;
|
|
92
|
+
type Callbacks = z.infer<typeof callbacksSchema>;
|
|
93
|
+
type JoinedChannelPayload = z.infer<typeof joinChannelSchema>;
|
|
94
|
+
type ListChannelsSchema = z.infer<typeof listChannelsSchema>;
|
|
95
|
+
declare const CHANNEL_BINDING_SCHEMA: readonly [{
|
|
96
|
+
readonly name: "DECO_CHAT_CHANNELS_JOIN";
|
|
97
|
+
readonly inputSchema: z.ZodObject<{
|
|
98
|
+
workspace: z.ZodString;
|
|
99
|
+
discriminator: z.ZodString;
|
|
100
|
+
} & {
|
|
101
|
+
agentId: z.ZodString;
|
|
102
|
+
agentName: z.ZodString;
|
|
103
|
+
agentLink: z.ZodString;
|
|
104
|
+
} & {
|
|
105
|
+
callbacks: z.ZodObject<{
|
|
106
|
+
stream: z.ZodString;
|
|
107
|
+
generate: z.ZodString;
|
|
108
|
+
generateObject: z.ZodString;
|
|
109
|
+
}, "strip", z.ZodTypeAny, {
|
|
110
|
+
stream: string;
|
|
111
|
+
generate: string;
|
|
112
|
+
generateObject: string;
|
|
113
|
+
}, {
|
|
114
|
+
stream: string;
|
|
115
|
+
generate: string;
|
|
116
|
+
generateObject: string;
|
|
117
|
+
}>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
workspace: string;
|
|
120
|
+
discriminator: string;
|
|
121
|
+
agentId: string;
|
|
122
|
+
agentName: string;
|
|
123
|
+
agentLink: string;
|
|
124
|
+
callbacks: {
|
|
125
|
+
stream: string;
|
|
126
|
+
generate: string;
|
|
127
|
+
generateObject: string;
|
|
128
|
+
};
|
|
129
|
+
}, {
|
|
130
|
+
workspace: string;
|
|
131
|
+
discriminator: string;
|
|
132
|
+
agentId: string;
|
|
133
|
+
agentName: string;
|
|
134
|
+
agentLink: string;
|
|
135
|
+
callbacks: {
|
|
136
|
+
stream: string;
|
|
137
|
+
generate: string;
|
|
138
|
+
generateObject: string;
|
|
139
|
+
};
|
|
140
|
+
}>;
|
|
141
|
+
readonly outputSchema: z.ZodAny;
|
|
142
|
+
}, {
|
|
143
|
+
readonly name: "DECO_CHAT_CHANNELS_LEAVE";
|
|
144
|
+
readonly inputSchema: z.ZodObject<{
|
|
145
|
+
workspace: z.ZodString;
|
|
146
|
+
discriminator: z.ZodString;
|
|
147
|
+
}, "strip", z.ZodTypeAny, {
|
|
148
|
+
workspace: string;
|
|
149
|
+
discriminator: string;
|
|
150
|
+
}, {
|
|
151
|
+
workspace: string;
|
|
152
|
+
discriminator: string;
|
|
153
|
+
}>;
|
|
154
|
+
readonly outputSchema: z.ZodAny;
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "DECO_CHAT_CHANNELS_LIST";
|
|
157
|
+
readonly inputSchema: z.ZodAny;
|
|
158
|
+
readonly outputSchema: z.ZodObject<{
|
|
159
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
160
|
+
label: z.ZodString;
|
|
161
|
+
value: z.ZodString;
|
|
162
|
+
}, "strip", z.ZodTypeAny, {
|
|
163
|
+
value: string;
|
|
164
|
+
label: string;
|
|
165
|
+
}, {
|
|
166
|
+
value: string;
|
|
167
|
+
label: string;
|
|
168
|
+
}>, "many">;
|
|
169
|
+
}, "strip", z.ZodTypeAny, {
|
|
170
|
+
channels: {
|
|
171
|
+
value: string;
|
|
172
|
+
label: string;
|
|
173
|
+
}[];
|
|
174
|
+
}, {
|
|
175
|
+
channels: {
|
|
176
|
+
value: string;
|
|
177
|
+
label: string;
|
|
178
|
+
}[];
|
|
179
|
+
}>;
|
|
180
|
+
readonly opt: true;
|
|
181
|
+
}];
|
|
182
|
+
|
|
183
|
+
interface ToolLike<TName extends string = string, TInput = any, TReturn extends object | null | boolean = object> {
|
|
184
|
+
name: TName;
|
|
185
|
+
description: string;
|
|
186
|
+
inputSchema: z.ZodType<TInput>;
|
|
187
|
+
outputSchema?: z.ZodType<TReturn>;
|
|
188
|
+
handler: (props: TInput) => Promise<TReturn> | TReturn;
|
|
189
|
+
}
|
|
190
|
+
type Binder<TDefinition extends readonly ToolBinder[] = readonly ToolBinder[]> = TDefinition;
|
|
191
|
+
type BinderImplementation<TBinder extends Binder<any>, TContext = any> = TBinder extends Binder<infer TDefinition> ? {
|
|
192
|
+
[K in keyof TDefinition]: Omit<ToolLike<TDefinition[K]["name"], z.infer<TDefinition[K]["inputSchema"]>, TDefinition[K] extends {
|
|
193
|
+
outputSchema: infer Schema;
|
|
194
|
+
} ? Schema extends z.ZodType ? z.infer<Schema> : never : never>, "name" | "inputSchema" | "outputSchema" | "handler"> & {
|
|
195
|
+
handler: (props: z.infer<TDefinition[K]["inputSchema"]>, c?: TContext) => ReturnType<ToolLike<TDefinition[K]["name"], z.infer<TDefinition[K]["inputSchema"]>, TDefinition[K] extends {
|
|
196
|
+
outputSchema: infer Schema;
|
|
197
|
+
} ? Schema extends z.ZodType ? z.infer<Schema> : never : never>["handler"]>;
|
|
198
|
+
};
|
|
199
|
+
} : never;
|
|
200
|
+
declare const bindingClient: <TDefinition extends readonly ToolBinder[]>(binder: TDefinition) => {
|
|
201
|
+
implements: (tools: ToolBinder[]) => boolean;
|
|
202
|
+
forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<TDefinition>;
|
|
203
|
+
};
|
|
204
|
+
type MCPBindingClient<T extends ReturnType<typeof bindingClient>> = ReturnType<T["forConnection"]>;
|
|
205
|
+
declare const ChannelBinding: {
|
|
206
|
+
implements: (tools: ToolBinder[]) => boolean;
|
|
207
|
+
forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<readonly [{
|
|
208
|
+
readonly name: "DECO_CHAT_CHANNELS_JOIN";
|
|
209
|
+
readonly inputSchema: z.ZodObject<{
|
|
210
|
+
workspace: z.ZodString;
|
|
211
|
+
discriminator: z.ZodString;
|
|
212
|
+
} & {
|
|
213
|
+
agentId: z.ZodString;
|
|
214
|
+
agentName: z.ZodString;
|
|
215
|
+
agentLink: z.ZodString;
|
|
216
|
+
} & {
|
|
217
|
+
callbacks: z.ZodObject<{
|
|
218
|
+
stream: z.ZodString;
|
|
219
|
+
generate: z.ZodString;
|
|
220
|
+
generateObject: z.ZodString;
|
|
221
|
+
}, "strip", z.ZodTypeAny, {
|
|
222
|
+
stream: string;
|
|
223
|
+
generate: string;
|
|
224
|
+
generateObject: string;
|
|
225
|
+
}, {
|
|
226
|
+
stream: string;
|
|
227
|
+
generate: string;
|
|
228
|
+
generateObject: string;
|
|
229
|
+
}>;
|
|
230
|
+
}, "strip", z.ZodTypeAny, {
|
|
231
|
+
workspace: string;
|
|
232
|
+
discriminator: string;
|
|
233
|
+
agentId: string;
|
|
234
|
+
agentName: string;
|
|
235
|
+
agentLink: string;
|
|
236
|
+
callbacks: {
|
|
237
|
+
stream: string;
|
|
238
|
+
generate: string;
|
|
239
|
+
generateObject: string;
|
|
240
|
+
};
|
|
241
|
+
}, {
|
|
242
|
+
workspace: string;
|
|
243
|
+
discriminator: string;
|
|
244
|
+
agentId: string;
|
|
245
|
+
agentName: string;
|
|
246
|
+
agentLink: string;
|
|
247
|
+
callbacks: {
|
|
248
|
+
stream: string;
|
|
249
|
+
generate: string;
|
|
250
|
+
generateObject: string;
|
|
251
|
+
};
|
|
252
|
+
}>;
|
|
253
|
+
readonly outputSchema: z.ZodAny;
|
|
254
|
+
}, {
|
|
255
|
+
readonly name: "DECO_CHAT_CHANNELS_LEAVE";
|
|
256
|
+
readonly inputSchema: z.ZodObject<{
|
|
257
|
+
workspace: z.ZodString;
|
|
258
|
+
discriminator: z.ZodString;
|
|
259
|
+
}, "strip", z.ZodTypeAny, {
|
|
260
|
+
workspace: string;
|
|
261
|
+
discriminator: string;
|
|
262
|
+
}, {
|
|
263
|
+
workspace: string;
|
|
264
|
+
discriminator: string;
|
|
265
|
+
}>;
|
|
266
|
+
readonly outputSchema: z.ZodAny;
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "DECO_CHAT_CHANNELS_LIST";
|
|
269
|
+
readonly inputSchema: z.ZodAny;
|
|
270
|
+
readonly outputSchema: z.ZodObject<{
|
|
271
|
+
channels: z.ZodArray<z.ZodObject<{
|
|
272
|
+
label: z.ZodString;
|
|
273
|
+
value: z.ZodString;
|
|
274
|
+
}, "strip", z.ZodTypeAny, {
|
|
275
|
+
value: string;
|
|
276
|
+
label: string;
|
|
277
|
+
}, {
|
|
278
|
+
value: string;
|
|
279
|
+
label: string;
|
|
280
|
+
}>, "many">;
|
|
281
|
+
}, "strip", z.ZodTypeAny, {
|
|
282
|
+
channels: {
|
|
283
|
+
value: string;
|
|
284
|
+
label: string;
|
|
285
|
+
}[];
|
|
286
|
+
}, {
|
|
287
|
+
channels: {
|
|
288
|
+
value: string;
|
|
289
|
+
label: string;
|
|
290
|
+
}[];
|
|
291
|
+
}>;
|
|
292
|
+
readonly opt: true;
|
|
293
|
+
}]>;
|
|
294
|
+
};
|
|
295
|
+
declare const ViewBinding: {
|
|
296
|
+
implements: (tools: ToolBinder[]) => boolean;
|
|
297
|
+
forConnection: (mcpConnection: MCPConnection) => MCPClientFetchStub<readonly [{
|
|
298
|
+
readonly name: "DECO_CHAT_VIEWS_LIST";
|
|
299
|
+
readonly inputSchema: z.ZodAny;
|
|
300
|
+
readonly outputSchema: z.ZodObject<{
|
|
301
|
+
views: z.ZodArray<z.ZodObject<{
|
|
302
|
+
id: z.ZodOptional<z.ZodString>;
|
|
303
|
+
name: z.ZodOptional<z.ZodString>;
|
|
304
|
+
title: z.ZodString;
|
|
305
|
+
description: z.ZodOptional<z.ZodString>;
|
|
306
|
+
icon: z.ZodString;
|
|
307
|
+
url: z.ZodOptional<z.ZodString>;
|
|
308
|
+
mimeTypePattern: z.ZodOptional<z.ZodString>;
|
|
309
|
+
resourceName: z.ZodOptional<z.ZodString>;
|
|
310
|
+
tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
311
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
312
|
+
installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
|
|
313
|
+
}, "strip", z.ZodTypeAny, {
|
|
314
|
+
tools: string[];
|
|
315
|
+
title: string;
|
|
316
|
+
icon: string;
|
|
317
|
+
id?: string | undefined;
|
|
318
|
+
name?: string | undefined;
|
|
319
|
+
url?: string | undefined;
|
|
320
|
+
description?: string | undefined;
|
|
321
|
+
resourceName?: string | undefined;
|
|
322
|
+
mimeTypePattern?: string | undefined;
|
|
323
|
+
prompt?: string | undefined;
|
|
324
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
325
|
+
}, {
|
|
326
|
+
title: string;
|
|
327
|
+
icon: string;
|
|
328
|
+
id?: string | undefined;
|
|
329
|
+
name?: string | undefined;
|
|
330
|
+
url?: string | undefined;
|
|
331
|
+
description?: string | undefined;
|
|
332
|
+
resourceName?: string | undefined;
|
|
333
|
+
tools?: string[] | undefined;
|
|
334
|
+
mimeTypePattern?: string | undefined;
|
|
335
|
+
prompt?: string | undefined;
|
|
336
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
337
|
+
}>, "many">;
|
|
338
|
+
}, "strip", z.ZodTypeAny, {
|
|
339
|
+
views: {
|
|
340
|
+
tools: string[];
|
|
341
|
+
title: string;
|
|
342
|
+
icon: string;
|
|
343
|
+
id?: string | undefined;
|
|
344
|
+
name?: string | undefined;
|
|
345
|
+
url?: string | undefined;
|
|
346
|
+
description?: string | undefined;
|
|
347
|
+
resourceName?: string | undefined;
|
|
348
|
+
mimeTypePattern?: string | undefined;
|
|
349
|
+
prompt?: string | undefined;
|
|
350
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
351
|
+
}[];
|
|
352
|
+
}, {
|
|
353
|
+
views: {
|
|
354
|
+
title: string;
|
|
355
|
+
icon: string;
|
|
356
|
+
id?: string | undefined;
|
|
357
|
+
name?: string | undefined;
|
|
358
|
+
url?: string | undefined;
|
|
359
|
+
description?: string | undefined;
|
|
360
|
+
resourceName?: string | undefined;
|
|
361
|
+
tools?: string[] | undefined;
|
|
362
|
+
mimeTypePattern?: string | undefined;
|
|
363
|
+
prompt?: string | undefined;
|
|
364
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
365
|
+
}[];
|
|
366
|
+
}>;
|
|
367
|
+
}]>;
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
declare const impl: <TBinder extends Binder>(schema: TBinder, implementation: BinderImplementation<TBinder>, createToolFn?: typeof createPrivateTool) => _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>>[];
|
|
371
|
+
|
|
372
|
+
declare const Binding: <TDefinition extends readonly ToolBinder[]>(binderTools: TDefinition) => {
|
|
373
|
+
isImplementedBy: (tools: Pick<ToolBinder, "name">[]) => boolean;
|
|
374
|
+
};
|
|
375
|
+
|
|
376
|
+
declare const VIEW_BINDING_SCHEMA: readonly [{
|
|
377
|
+
readonly name: "DECO_CHAT_VIEWS_LIST";
|
|
378
|
+
readonly inputSchema: z.ZodAny;
|
|
379
|
+
readonly outputSchema: z.ZodObject<{
|
|
380
|
+
views: z.ZodArray<z.ZodObject<{
|
|
381
|
+
id: z.ZodOptional<z.ZodString>;
|
|
382
|
+
name: z.ZodOptional<z.ZodString>;
|
|
383
|
+
title: z.ZodString;
|
|
384
|
+
description: z.ZodOptional<z.ZodString>;
|
|
385
|
+
icon: z.ZodString;
|
|
386
|
+
url: z.ZodOptional<z.ZodString>;
|
|
387
|
+
mimeTypePattern: z.ZodOptional<z.ZodString>;
|
|
388
|
+
resourceName: z.ZodOptional<z.ZodString>;
|
|
389
|
+
tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
390
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
391
|
+
installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
|
|
392
|
+
}, "strip", z.ZodTypeAny, {
|
|
393
|
+
tools: string[];
|
|
394
|
+
title: string;
|
|
395
|
+
icon: string;
|
|
396
|
+
id?: string | undefined;
|
|
397
|
+
name?: string | undefined;
|
|
398
|
+
url?: string | undefined;
|
|
399
|
+
description?: string | undefined;
|
|
400
|
+
resourceName?: string | undefined;
|
|
401
|
+
mimeTypePattern?: string | undefined;
|
|
402
|
+
prompt?: string | undefined;
|
|
403
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
404
|
+
}, {
|
|
405
|
+
title: string;
|
|
406
|
+
icon: string;
|
|
407
|
+
id?: string | undefined;
|
|
408
|
+
name?: string | undefined;
|
|
409
|
+
url?: string | undefined;
|
|
410
|
+
description?: string | undefined;
|
|
411
|
+
resourceName?: string | undefined;
|
|
412
|
+
tools?: string[] | undefined;
|
|
413
|
+
mimeTypePattern?: string | undefined;
|
|
414
|
+
prompt?: string | undefined;
|
|
415
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
416
|
+
}>, "many">;
|
|
417
|
+
}, "strip", z.ZodTypeAny, {
|
|
418
|
+
views: {
|
|
419
|
+
tools: string[];
|
|
420
|
+
title: string;
|
|
421
|
+
icon: string;
|
|
422
|
+
id?: string | undefined;
|
|
423
|
+
name?: string | undefined;
|
|
424
|
+
url?: string | undefined;
|
|
425
|
+
description?: string | undefined;
|
|
426
|
+
resourceName?: string | undefined;
|
|
427
|
+
mimeTypePattern?: string | undefined;
|
|
428
|
+
prompt?: string | undefined;
|
|
429
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
430
|
+
}[];
|
|
431
|
+
}, {
|
|
432
|
+
views: {
|
|
433
|
+
title: string;
|
|
434
|
+
icon: string;
|
|
435
|
+
id?: string | undefined;
|
|
436
|
+
name?: string | undefined;
|
|
437
|
+
url?: string | undefined;
|
|
438
|
+
description?: string | undefined;
|
|
439
|
+
resourceName?: string | undefined;
|
|
440
|
+
tools?: string[] | undefined;
|
|
441
|
+
mimeTypePattern?: string | undefined;
|
|
442
|
+
prompt?: string | undefined;
|
|
443
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
444
|
+
}[];
|
|
445
|
+
}>;
|
|
446
|
+
}];
|
|
447
|
+
declare const listViewsSchema: z.ZodObject<{
|
|
448
|
+
views: z.ZodArray<z.ZodObject<{
|
|
449
|
+
id: z.ZodOptional<z.ZodString>;
|
|
450
|
+
name: z.ZodOptional<z.ZodString>;
|
|
451
|
+
title: z.ZodString;
|
|
452
|
+
description: z.ZodOptional<z.ZodString>;
|
|
453
|
+
icon: z.ZodString;
|
|
454
|
+
url: z.ZodOptional<z.ZodString>;
|
|
455
|
+
mimeTypePattern: z.ZodOptional<z.ZodString>;
|
|
456
|
+
resourceName: z.ZodOptional<z.ZodString>;
|
|
457
|
+
tools: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
458
|
+
prompt: z.ZodOptional<z.ZodString>;
|
|
459
|
+
installBehavior: z.ZodOptional<z.ZodEnum<["none", "open", "autoPin"]>>;
|
|
460
|
+
}, "strip", z.ZodTypeAny, {
|
|
461
|
+
tools: string[];
|
|
462
|
+
title: string;
|
|
463
|
+
icon: string;
|
|
464
|
+
id?: string | undefined;
|
|
465
|
+
name?: string | undefined;
|
|
466
|
+
url?: string | undefined;
|
|
467
|
+
description?: string | undefined;
|
|
468
|
+
resourceName?: string | undefined;
|
|
469
|
+
mimeTypePattern?: string | undefined;
|
|
470
|
+
prompt?: string | undefined;
|
|
471
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
472
|
+
}, {
|
|
473
|
+
title: string;
|
|
474
|
+
icon: string;
|
|
475
|
+
id?: string | undefined;
|
|
476
|
+
name?: string | undefined;
|
|
477
|
+
url?: string | undefined;
|
|
478
|
+
description?: string | undefined;
|
|
479
|
+
resourceName?: string | undefined;
|
|
480
|
+
tools?: string[] | undefined;
|
|
481
|
+
mimeTypePattern?: string | undefined;
|
|
482
|
+
prompt?: string | undefined;
|
|
483
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
484
|
+
}>, "many">;
|
|
485
|
+
}, "strip", z.ZodTypeAny, {
|
|
486
|
+
views: {
|
|
487
|
+
tools: string[];
|
|
488
|
+
title: string;
|
|
489
|
+
icon: string;
|
|
490
|
+
id?: string | undefined;
|
|
491
|
+
name?: string | undefined;
|
|
492
|
+
url?: string | undefined;
|
|
493
|
+
description?: string | undefined;
|
|
494
|
+
resourceName?: string | undefined;
|
|
495
|
+
mimeTypePattern?: string | undefined;
|
|
496
|
+
prompt?: string | undefined;
|
|
497
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
498
|
+
}[];
|
|
499
|
+
}, {
|
|
500
|
+
views: {
|
|
501
|
+
title: string;
|
|
502
|
+
icon: string;
|
|
503
|
+
id?: string | undefined;
|
|
504
|
+
name?: string | undefined;
|
|
505
|
+
url?: string | undefined;
|
|
506
|
+
description?: string | undefined;
|
|
507
|
+
resourceName?: string | undefined;
|
|
508
|
+
tools?: string[] | undefined;
|
|
509
|
+
mimeTypePattern?: string | undefined;
|
|
510
|
+
prompt?: string | undefined;
|
|
511
|
+
installBehavior?: "open" | "none" | "autoPin" | undefined;
|
|
512
|
+
}[];
|
|
513
|
+
}>;
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Resources 2.0 Schemas
|
|
517
|
+
*
|
|
518
|
+
* This module provides standardized schemas for Resources 2.0, a major version upgrade
|
|
519
|
+
* that introduces standardized resource management with `rsc://` URI format and
|
|
520
|
+
* consistent CRUD operations across all resource types.
|
|
521
|
+
*
|
|
522
|
+
* Key Features:
|
|
523
|
+
* - Standardized `rsc://` URI format for all resources
|
|
524
|
+
* - Generic CRUD operation schemas that work with any resource type
|
|
525
|
+
* - Type-safe factory functions for creating resource-specific schemas
|
|
526
|
+
* - Comprehensive validation and error handling
|
|
527
|
+
* - Full TypeScript support with Zod validation
|
|
528
|
+
*/
|
|
529
|
+
declare const ResourceUriSchema: z.ZodString;
|
|
530
|
+
declare const DescribeInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
531
|
+
declare const DescribeOutputSchema: z.ZodObject<{
|
|
532
|
+
uriTemplate: z.ZodString;
|
|
533
|
+
features: z.ZodObject<{
|
|
534
|
+
watch: z.ZodObject<{
|
|
535
|
+
pathname: z.ZodString;
|
|
536
|
+
}, "strip", z.ZodTypeAny, {
|
|
537
|
+
pathname: string;
|
|
538
|
+
}, {
|
|
539
|
+
pathname: string;
|
|
540
|
+
}>;
|
|
541
|
+
}, "strip", z.ZodTypeAny, {
|
|
542
|
+
watch: {
|
|
543
|
+
pathname: string;
|
|
544
|
+
};
|
|
545
|
+
}, {
|
|
546
|
+
watch: {
|
|
547
|
+
pathname: string;
|
|
548
|
+
};
|
|
549
|
+
}>;
|
|
550
|
+
}, "strip", z.ZodTypeAny, {
|
|
551
|
+
uriTemplate: string;
|
|
552
|
+
features: {
|
|
553
|
+
watch: {
|
|
554
|
+
pathname: string;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
}, {
|
|
558
|
+
uriTemplate: string;
|
|
559
|
+
features: {
|
|
560
|
+
watch: {
|
|
561
|
+
pathname: string;
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
}>;
|
|
565
|
+
/**
|
|
566
|
+
* Search input schema for resource queries
|
|
567
|
+
* Supports pagination, filtering, sorting, and search terms
|
|
568
|
+
*/
|
|
569
|
+
declare const SearchInputSchema: z.ZodObject<{
|
|
570
|
+
term: z.ZodOptional<z.ZodString>;
|
|
571
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
572
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
573
|
+
filters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
574
|
+
sortBy: z.ZodOptional<z.ZodString>;
|
|
575
|
+
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
|
|
576
|
+
}, "strip", z.ZodTypeAny, {
|
|
577
|
+
page: number;
|
|
578
|
+
pageSize: number;
|
|
579
|
+
sortOrder: "asc" | "desc";
|
|
580
|
+
filters?: Record<string, any> | undefined;
|
|
581
|
+
term?: string | undefined;
|
|
582
|
+
sortBy?: string | undefined;
|
|
583
|
+
}, {
|
|
584
|
+
filters?: Record<string, any> | undefined;
|
|
585
|
+
term?: string | undefined;
|
|
586
|
+
page?: number | undefined;
|
|
587
|
+
pageSize?: number | undefined;
|
|
588
|
+
sortBy?: string | undefined;
|
|
589
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
590
|
+
}>;
|
|
591
|
+
/**
|
|
592
|
+
* Factory function to create search output schema for a specific resource type
|
|
593
|
+
* @param itemSchema - The schema for individual resource items
|
|
594
|
+
* @returns Zod schema for search results with pagination metadata
|
|
595
|
+
*/
|
|
596
|
+
declare function createSearchOutputSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
|
|
597
|
+
items: z.ZodArray<T, "many">;
|
|
598
|
+
totalCount: z.ZodNumber;
|
|
599
|
+
page: z.ZodNumber;
|
|
600
|
+
pageSize: z.ZodNumber;
|
|
601
|
+
totalPages: z.ZodNumber;
|
|
602
|
+
hasNextPage: z.ZodBoolean;
|
|
603
|
+
hasPreviousPage: z.ZodBoolean;
|
|
604
|
+
}, "strip", z.ZodTypeAny, {
|
|
605
|
+
items: T["_output"][];
|
|
606
|
+
page: number;
|
|
607
|
+
pageSize: number;
|
|
608
|
+
totalCount: number;
|
|
609
|
+
totalPages: number;
|
|
610
|
+
hasNextPage: boolean;
|
|
611
|
+
hasPreviousPage: boolean;
|
|
612
|
+
}, {
|
|
613
|
+
items: T["_input"][];
|
|
614
|
+
page: number;
|
|
615
|
+
pageSize: number;
|
|
616
|
+
totalCount: number;
|
|
617
|
+
totalPages: number;
|
|
618
|
+
hasNextPage: boolean;
|
|
619
|
+
hasPreviousPage: boolean;
|
|
620
|
+
}>;
|
|
621
|
+
/**
|
|
622
|
+
* Read input schema for retrieving a single resource
|
|
623
|
+
*/
|
|
624
|
+
declare const ReadInputSchema: z.ZodObject<{
|
|
625
|
+
uri: z.ZodString;
|
|
626
|
+
}, "strip", z.ZodTypeAny, {
|
|
627
|
+
uri: string;
|
|
628
|
+
}, {
|
|
629
|
+
uri: string;
|
|
630
|
+
}>;
|
|
631
|
+
/**
|
|
632
|
+
* Factory function to create read output schema for a specific resource type
|
|
633
|
+
* @param dataSchema - The schema for the resource data
|
|
634
|
+
* @returns Zod schema for read operation results
|
|
635
|
+
*/
|
|
636
|
+
declare function createReadOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
637
|
+
uri: z.ZodString;
|
|
638
|
+
data: T;
|
|
639
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
640
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
641
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
642
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
643
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
644
|
+
uri: z.ZodString;
|
|
645
|
+
data: T;
|
|
646
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
647
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
648
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
649
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
650
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
651
|
+
uri: z.ZodString;
|
|
652
|
+
data: T;
|
|
653
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
654
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
655
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
656
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
657
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
658
|
+
/**
|
|
659
|
+
* Factory function to create create input schema for a specific resource type
|
|
660
|
+
* @param dataSchema - The schema for the resource data to create
|
|
661
|
+
* @returns Zod schema for create operation input
|
|
662
|
+
*/
|
|
663
|
+
declare function createCreateInputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
664
|
+
data: T;
|
|
665
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
666
|
+
data: T;
|
|
667
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
668
|
+
data: T;
|
|
669
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
670
|
+
/**
|
|
671
|
+
* Factory function to create create output schema for a specific resource type
|
|
672
|
+
* @param dataSchema - The schema for the created resource data
|
|
673
|
+
* @returns Zod schema for create operation results
|
|
674
|
+
*/
|
|
675
|
+
declare function createCreateOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
676
|
+
uri: z.ZodString;
|
|
677
|
+
data: T;
|
|
678
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
679
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
680
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
681
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
682
|
+
uri: z.ZodString;
|
|
683
|
+
data: T;
|
|
684
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
685
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
686
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
687
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
688
|
+
uri: z.ZodString;
|
|
689
|
+
data: T;
|
|
690
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
691
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
692
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
693
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
694
|
+
/**
|
|
695
|
+
* Factory function to create update input schema for a specific resource type
|
|
696
|
+
* @param dataSchema - The schema for the resource data to update
|
|
697
|
+
* @returns Zod schema for update operation input
|
|
698
|
+
*/
|
|
699
|
+
declare function createUpdateInputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
700
|
+
uri: z.ZodString;
|
|
701
|
+
data: T;
|
|
702
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
703
|
+
uri: z.ZodString;
|
|
704
|
+
data: T;
|
|
705
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
706
|
+
uri: z.ZodString;
|
|
707
|
+
data: T;
|
|
708
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
709
|
+
/**
|
|
710
|
+
* Factory function to create update output schema for a specific resource type
|
|
711
|
+
* @param dataSchema - The schema for the updated resource data
|
|
712
|
+
* @returns Zod schema for update operation results
|
|
713
|
+
*/
|
|
714
|
+
declare function createUpdateOutputSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
715
|
+
uri: z.ZodString;
|
|
716
|
+
data: T;
|
|
717
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
718
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
719
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
720
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
721
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
722
|
+
uri: z.ZodString;
|
|
723
|
+
data: T;
|
|
724
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
725
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
726
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
727
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
728
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
729
|
+
uri: z.ZodString;
|
|
730
|
+
data: T;
|
|
731
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
732
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
733
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
734
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
735
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
736
|
+
/**
|
|
737
|
+
* Delete input schema for removing a resource
|
|
738
|
+
*/
|
|
739
|
+
declare const DeleteInputSchema: z.ZodObject<{
|
|
740
|
+
uri: z.ZodString;
|
|
741
|
+
}, "strip", z.ZodTypeAny, {
|
|
742
|
+
uri: string;
|
|
743
|
+
}, {
|
|
744
|
+
uri: string;
|
|
745
|
+
}>;
|
|
746
|
+
/**
|
|
747
|
+
* Delete output schema for delete operation results
|
|
748
|
+
*/
|
|
749
|
+
declare const DeleteOutputSchema: z.ZodObject<{
|
|
750
|
+
success: z.ZodBoolean;
|
|
751
|
+
uri: z.ZodString;
|
|
752
|
+
}, "strip", z.ZodTypeAny, {
|
|
753
|
+
success: boolean;
|
|
754
|
+
uri: string;
|
|
755
|
+
}, {
|
|
756
|
+
success: boolean;
|
|
757
|
+
uri: string;
|
|
758
|
+
}>;
|
|
759
|
+
/**
|
|
760
|
+
* Factory function to create item schema for a specific resource type
|
|
761
|
+
* This schema is used in search results and lists
|
|
762
|
+
* @param dataSchema - The schema for the resource data
|
|
763
|
+
* @returns Zod schema for resource items with metadata
|
|
764
|
+
*/
|
|
765
|
+
declare function createItemSchema<T extends z.ZodTypeAny>(dataSchema: T): z.ZodObject<{
|
|
766
|
+
uri: z.ZodString;
|
|
767
|
+
data: z.ZodIntersection<z.ZodObject<{
|
|
768
|
+
name: z.ZodString;
|
|
769
|
+
description: z.ZodOptional<z.ZodString>;
|
|
770
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
771
|
+
}, "strip", z.ZodTypeAny, {
|
|
772
|
+
name: string;
|
|
773
|
+
description?: string | undefined;
|
|
774
|
+
icon?: string | undefined;
|
|
775
|
+
}, {
|
|
776
|
+
name: string;
|
|
777
|
+
description?: string | undefined;
|
|
778
|
+
icon?: string | undefined;
|
|
779
|
+
}>, T>;
|
|
780
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
781
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
782
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
783
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
784
|
+
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
|
|
785
|
+
uri: z.ZodString;
|
|
786
|
+
data: z.ZodIntersection<z.ZodObject<{
|
|
787
|
+
name: z.ZodString;
|
|
788
|
+
description: z.ZodOptional<z.ZodString>;
|
|
789
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
790
|
+
}, "strip", z.ZodTypeAny, {
|
|
791
|
+
name: string;
|
|
792
|
+
description?: string | undefined;
|
|
793
|
+
icon?: string | undefined;
|
|
794
|
+
}, {
|
|
795
|
+
name: string;
|
|
796
|
+
description?: string | undefined;
|
|
797
|
+
icon?: string | undefined;
|
|
798
|
+
}>, T>;
|
|
799
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
800
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
801
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
802
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
803
|
+
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
|
|
804
|
+
uri: z.ZodString;
|
|
805
|
+
data: z.ZodIntersection<z.ZodObject<{
|
|
806
|
+
name: z.ZodString;
|
|
807
|
+
description: z.ZodOptional<z.ZodString>;
|
|
808
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
809
|
+
}, "strip", z.ZodTypeAny, {
|
|
810
|
+
name: string;
|
|
811
|
+
description?: string | undefined;
|
|
812
|
+
icon?: string | undefined;
|
|
813
|
+
}, {
|
|
814
|
+
name: string;
|
|
815
|
+
description?: string | undefined;
|
|
816
|
+
icon?: string | undefined;
|
|
817
|
+
}>, T>;
|
|
818
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
819
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
820
|
+
created_by: z.ZodOptional<z.ZodString>;
|
|
821
|
+
updated_by: z.ZodOptional<z.ZodString>;
|
|
822
|
+
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
|
|
823
|
+
type SearchInput = z.infer<typeof SearchInputSchema>;
|
|
824
|
+
type SearchOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createSearchOutputSchema<T>>>;
|
|
825
|
+
type ReadInput = z.infer<typeof ReadInputSchema>;
|
|
826
|
+
type ReadOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createReadOutputSchema<T>>>;
|
|
827
|
+
type CreateInput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createCreateInputSchema<T>>>;
|
|
828
|
+
type CreateOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createCreateOutputSchema<T>>>;
|
|
829
|
+
type UpdateInput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createUpdateInputSchema<T>>>;
|
|
830
|
+
type UpdateOutput<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createUpdateOutputSchema<T>>>;
|
|
831
|
+
type DeleteInput = z.infer<typeof DeleteInputSchema>;
|
|
832
|
+
type DeleteOutput = z.infer<typeof DeleteOutputSchema>;
|
|
833
|
+
type ResourceItem<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createItemSchema<T>>>;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Resources 2.0 Helper Functions
|
|
837
|
+
*
|
|
838
|
+
* This module provides helper functions for working with Resources 2.0
|
|
839
|
+
* URI format and validation.
|
|
840
|
+
*
|
|
841
|
+
* Key Features:
|
|
842
|
+
* - URI validation and parsing utilities
|
|
843
|
+
* - URI construction helpers
|
|
844
|
+
* - Type-safe resource URI handling
|
|
845
|
+
*/
|
|
846
|
+
/**
|
|
847
|
+
* Utility function to validate a resource URI format
|
|
848
|
+
*
|
|
849
|
+
* @param uri - The URI to validate
|
|
850
|
+
* @returns True if the URI is valid, false otherwise
|
|
851
|
+
*/
|
|
852
|
+
declare function validateResourceUri(uri: string): boolean;
|
|
853
|
+
/**
|
|
854
|
+
* Utility function to parse a resource URI into its components
|
|
855
|
+
*
|
|
856
|
+
* @param uri - The URI to parse
|
|
857
|
+
* @returns Object containing the parsed components or null if invalid
|
|
858
|
+
*/
|
|
859
|
+
declare function parseResourceUri(uri: string): {
|
|
860
|
+
workspace: string;
|
|
861
|
+
project: string;
|
|
862
|
+
resourceId: string;
|
|
863
|
+
} | null;
|
|
864
|
+
/**
|
|
865
|
+
* Utility function to construct a resource URI from components
|
|
866
|
+
*
|
|
867
|
+
* @param workspace - The workspace identifier
|
|
868
|
+
* @param project - The project identifier
|
|
869
|
+
* @param resourceId - The resource identifier
|
|
870
|
+
* @returns The constructed resource URI
|
|
871
|
+
*/
|
|
872
|
+
declare function constructResourceUri(workspace: string, project: string, resourceId: string): string;
|
|
873
|
+
|
|
874
|
+
declare const normalizeDirectory: (dir: string) => string;
|
|
875
|
+
declare const ResourcePath: {
|
|
876
|
+
build: (directory: string, resourceId: string) => string;
|
|
877
|
+
extract: (path: string) => {
|
|
878
|
+
directory: string;
|
|
879
|
+
resourceId: string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
declare const ResourceUri: {
|
|
883
|
+
build: (integrationId: string, resourceName: string, resourceId: string) => string;
|
|
884
|
+
unwind: (uri: string) => {
|
|
885
|
+
resourceName: string;
|
|
886
|
+
resourceId: string;
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
declare function getMetadataValue(metadata: unknown, key: string): unknown;
|
|
890
|
+
declare function getMetadataString(metadata: unknown, key: string): string | undefined;
|
|
891
|
+
|
|
892
|
+
declare const WellKnownBindings: {
|
|
893
|
+
readonly Channel: readonly [{
|
|
894
|
+
readonly name: "DECO_CHAT_CHANNELS_JOIN";
|
|
895
|
+
readonly inputSchema: zod.ZodObject<{
|
|
896
|
+
workspace: zod.ZodString;
|
|
897
|
+
discriminator: zod.ZodString;
|
|
898
|
+
} & {
|
|
899
|
+
agentId: zod.ZodString;
|
|
900
|
+
agentName: zod.ZodString;
|
|
901
|
+
agentLink: zod.ZodString;
|
|
902
|
+
} & {
|
|
903
|
+
callbacks: zod.ZodObject<{
|
|
904
|
+
stream: zod.ZodString;
|
|
905
|
+
generate: zod.ZodString;
|
|
906
|
+
generateObject: zod.ZodString;
|
|
907
|
+
}, "strip", zod.ZodTypeAny, {
|
|
908
|
+
stream: string;
|
|
909
|
+
generate: string;
|
|
910
|
+
generateObject: string;
|
|
911
|
+
}, {
|
|
912
|
+
stream: string;
|
|
913
|
+
generate: string;
|
|
914
|
+
generateObject: string;
|
|
915
|
+
}>;
|
|
916
|
+
}, "strip", zod.ZodTypeAny, {
|
|
917
|
+
workspace: string;
|
|
918
|
+
discriminator: string;
|
|
919
|
+
agentId: string;
|
|
920
|
+
agentName: string;
|
|
921
|
+
agentLink: string;
|
|
922
|
+
callbacks: {
|
|
923
|
+
stream: string;
|
|
924
|
+
generate: string;
|
|
925
|
+
generateObject: string;
|
|
926
|
+
};
|
|
927
|
+
}, {
|
|
928
|
+
workspace: string;
|
|
929
|
+
discriminator: string;
|
|
930
|
+
agentId: string;
|
|
931
|
+
agentName: string;
|
|
932
|
+
agentLink: string;
|
|
933
|
+
callbacks: {
|
|
934
|
+
stream: string;
|
|
935
|
+
generate: string;
|
|
936
|
+
generateObject: string;
|
|
937
|
+
};
|
|
938
|
+
}>;
|
|
939
|
+
readonly outputSchema: zod.ZodAny;
|
|
940
|
+
}, {
|
|
941
|
+
readonly name: "DECO_CHAT_CHANNELS_LEAVE";
|
|
942
|
+
readonly inputSchema: zod.ZodObject<{
|
|
943
|
+
workspace: zod.ZodString;
|
|
944
|
+
discriminator: zod.ZodString;
|
|
945
|
+
}, "strip", zod.ZodTypeAny, {
|
|
946
|
+
workspace: string;
|
|
947
|
+
discriminator: string;
|
|
948
|
+
}, {
|
|
949
|
+
workspace: string;
|
|
950
|
+
discriminator: string;
|
|
951
|
+
}>;
|
|
952
|
+
readonly outputSchema: zod.ZodAny;
|
|
953
|
+
}, {
|
|
954
|
+
readonly name: "DECO_CHAT_CHANNELS_LIST";
|
|
955
|
+
readonly inputSchema: zod.ZodAny;
|
|
956
|
+
readonly outputSchema: zod.ZodObject<{
|
|
957
|
+
channels: zod.ZodArray<zod.ZodObject<{
|
|
958
|
+
label: zod.ZodString;
|
|
959
|
+
value: zod.ZodString;
|
|
960
|
+
}, "strip", zod.ZodTypeAny, {
|
|
961
|
+
value: string;
|
|
962
|
+
label: string;
|
|
963
|
+
}, {
|
|
964
|
+
value: string;
|
|
965
|
+
label: string;
|
|
966
|
+
}>, "many">;
|
|
967
|
+
}, "strip", zod.ZodTypeAny, {
|
|
968
|
+
channels: {
|
|
969
|
+
value: string;
|
|
970
|
+
label: string;
|
|
971
|
+
}[];
|
|
972
|
+
}, {
|
|
973
|
+
channels: {
|
|
974
|
+
value: string;
|
|
975
|
+
label: string;
|
|
976
|
+
}[];
|
|
977
|
+
}>;
|
|
978
|
+
readonly opt: true;
|
|
979
|
+
}];
|
|
980
|
+
readonly View: readonly [{
|
|
981
|
+
readonly name: "DECO_CHAT_VIEWS_LIST";
|
|
982
|
+
readonly inputSchema: zod.ZodAny;
|
|
983
|
+
readonly outputSchema: zod.ZodObject<{
|
|
984
|
+
views: zod.ZodArray<zod.ZodObject<{
|
|
985
|
+
id: zod.ZodOptional<zod.ZodString>;
|
|
986
|
+
name: zod.ZodOptional<zod.ZodString>;
|
|
987
|
+
title: zod.ZodString;
|
|
988
|
+
description: zod.ZodOptional<zod.ZodString>;
|
|
989
|
+
icon: zod.ZodString;
|
|
990
|
+
url: zod.ZodOptional<zod.ZodString>;
|
|
991
|
+
mimeTypePattern: zod.ZodOptional<zod.ZodString>;
|
|
992
|
+
resourceName: zod.ZodOptional<zod.ZodString>;
|
|
993
|
+
tools: zod.ZodDefault<zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>>;
|
|
994
|
+
prompt: zod.ZodOptional<zod.ZodString>;
|
|
995
|
+
installBehavior: zod.ZodOptional<zod.ZodEnum<["none", "open", "autoPin"]>>;
|
|
996
|
+
}, "strip", zod.ZodTypeAny, {
|
|
997
|
+
title: string;
|
|
998
|
+
icon: string;
|
|
999
|
+
tools: string[];
|
|
1000
|
+
id?: string | undefined;
|
|
1001
|
+
name?: string | undefined;
|
|
1002
|
+
description?: string | undefined;
|
|
1003
|
+
url?: string | undefined;
|
|
1004
|
+
mimeTypePattern?: string | undefined;
|
|
1005
|
+
resourceName?: string | undefined;
|
|
1006
|
+
prompt?: string | undefined;
|
|
1007
|
+
installBehavior?: "none" | "open" | "autoPin" | undefined;
|
|
1008
|
+
}, {
|
|
1009
|
+
title: string;
|
|
1010
|
+
icon: string;
|
|
1011
|
+
id?: string | undefined;
|
|
1012
|
+
name?: string | undefined;
|
|
1013
|
+
description?: string | undefined;
|
|
1014
|
+
url?: string | undefined;
|
|
1015
|
+
mimeTypePattern?: string | undefined;
|
|
1016
|
+
resourceName?: string | undefined;
|
|
1017
|
+
tools?: string[] | undefined;
|
|
1018
|
+
prompt?: string | undefined;
|
|
1019
|
+
installBehavior?: "none" | "open" | "autoPin" | undefined;
|
|
1020
|
+
}>, "many">;
|
|
1021
|
+
}, "strip", zod.ZodTypeAny, {
|
|
1022
|
+
views: {
|
|
1023
|
+
title: string;
|
|
1024
|
+
icon: string;
|
|
1025
|
+
tools: string[];
|
|
1026
|
+
id?: string | undefined;
|
|
1027
|
+
name?: string | undefined;
|
|
1028
|
+
description?: string | undefined;
|
|
1029
|
+
url?: string | undefined;
|
|
1030
|
+
mimeTypePattern?: string | undefined;
|
|
1031
|
+
resourceName?: string | undefined;
|
|
1032
|
+
prompt?: string | undefined;
|
|
1033
|
+
installBehavior?: "none" | "open" | "autoPin" | undefined;
|
|
1034
|
+
}[];
|
|
1035
|
+
}, {
|
|
1036
|
+
views: {
|
|
1037
|
+
title: string;
|
|
1038
|
+
icon: string;
|
|
1039
|
+
id?: string | undefined;
|
|
1040
|
+
name?: string | undefined;
|
|
1041
|
+
description?: string | undefined;
|
|
1042
|
+
url?: string | undefined;
|
|
1043
|
+
mimeTypePattern?: string | undefined;
|
|
1044
|
+
resourceName?: string | undefined;
|
|
1045
|
+
tools?: string[] | undefined;
|
|
1046
|
+
prompt?: string | undefined;
|
|
1047
|
+
installBehavior?: "none" | "open" | "autoPin" | undefined;
|
|
1048
|
+
}[];
|
|
1049
|
+
}>;
|
|
1050
|
+
}];
|
|
1051
|
+
};
|
|
1052
|
+
type WellKnownBindingsName = keyof typeof WellKnownBindings;
|
|
1053
|
+
|
|
1054
|
+
export { type Binder, type BinderImplementation, Binding, CHANNEL_BINDING_SCHEMA, 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_SCHEMA, 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, validateResourceUri };
|