@decocms/bindings 0.2.0 → 0.2.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.
- package/dist/browser/agents.js +29 -0
- package/dist/browser/agents.js.map +1 -0
- package/dist/browser/chunk-6QEXJ7XW.js +48564 -0
- package/dist/browser/chunk-6QEXJ7XW.js.map +1 -0
- package/dist/browser/chunk-WKNVAFKE.js +2176 -0
- package/dist/browser/chunk-WKNVAFKE.js.map +1 -0
- package/dist/browser/chunk-XWLBKKHZ.js +127 -0
- package/dist/browser/chunk-XWLBKKHZ.js.map +1 -0
- package/dist/browser/chunk-ZX4ZDU2T.js +58 -0
- package/dist/browser/chunk-ZX4ZDU2T.js.map +1 -0
- package/dist/browser/client.js +9 -0
- package/dist/browser/client.js.map +1 -0
- package/dist/browser/collections.js +4 -0
- package/dist/browser/collections.js.map +1 -0
- package/dist/browser/connection.js +8 -0
- package/dist/browser/connection.js.map +1 -0
- package/dist/browser/index.js +10 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/language-model.js +205 -0
- package/dist/browser/language-model.js.map +1 -0
- package/dist/node/agents.d.ts +903 -0
- package/dist/node/agents.js +27 -0
- package/dist/node/agents.js.map +1 -0
- package/dist/node/chunk-BLCFITZG.js +56 -0
- package/dist/node/chunk-BLCFITZG.js.map +1 -0
- package/dist/node/chunk-QMQMPK7Q.js +50 -0
- package/dist/node/chunk-QMQMPK7Q.js.map +1 -0
- package/dist/node/chunk-QP7AQCEP.js +23478 -0
- package/dist/node/chunk-QP7AQCEP.js.map +1 -0
- package/dist/node/chunk-T2DG7334.js +125 -0
- package/dist/node/chunk-T2DG7334.js.map +1 -0
- package/dist/node/client.d.ts +12 -0
- package/dist/node/client.js +7 -0
- package/dist/node/client.js.map +1 -0
- package/dist/node/collections.d.ts +537 -0
- package/dist/node/collections.js +4 -0
- package/dist/node/collections.js.map +1 -0
- package/dist/node/connection.d.ts +30 -0
- package/dist/node/connection.js +6 -0
- package/dist/node/connection.js.map +1 -0
- package/dist/node/index.d.ts +94 -0
- package/dist/node/index.js +8 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/language-model.d.ts +2840 -0
- package/dist/node/language-model.js +203 -0
- package/dist/node/language-model.js.map +1 -0
- package/package.json +45 -16
- package/src/core/binder.ts +0 -226
- package/src/index.ts +0 -15
- package/src/well-known/collections.ts +0 -363
- package/src/well-known/models.ts +0 -87
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { ToolBinder } from "../core/binder";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Collection Bindings
|
|
6
|
-
*
|
|
7
|
-
* This module provides standardized tool bindings for Collections, representing
|
|
8
|
-
* SQL table-like structures with CRUD + Search operations compatible with TanStack DB.
|
|
9
|
-
*
|
|
10
|
-
* Key Features:
|
|
11
|
-
* - Generic collection bindings that work with any entity type
|
|
12
|
-
* - Standardized tool naming: `COLLECTION_{COLLECTION}_*`
|
|
13
|
-
* - Compatible with TanStack DB query-collection
|
|
14
|
-
* - Full TypeScript support with proper type constraints
|
|
15
|
-
* - Support for filtering, sorting, and pagination
|
|
16
|
-
* - Simple id and title fields for human-readable identification
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Base schema for collection entities
|
|
21
|
-
* All collection entities must have an id, title, and audit trail fields
|
|
22
|
-
*/
|
|
23
|
-
export const BaseCollectionEntitySchema = z.object({
|
|
24
|
-
id: z.string().describe("Unique identifier for the entity"),
|
|
25
|
-
title: z.string().describe("Human-readable title for the entity"),
|
|
26
|
-
created_at: z.string().datetime(),
|
|
27
|
-
updated_at: z.string().datetime(),
|
|
28
|
-
created_by: z.string().optional(),
|
|
29
|
-
updated_by: z.string().optional(),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Type helper for BaseCollectionEntitySchema
|
|
34
|
-
*/
|
|
35
|
-
export type BaseCollectionEntitySchemaType = typeof BaseCollectionEntitySchema;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Comparison expression schema for filtering
|
|
39
|
-
*/
|
|
40
|
-
const ComparisonExpressionSchema = z.object({
|
|
41
|
-
field: z.array(z.string()),
|
|
42
|
-
operator: z.enum(["eq", "gt", "gte", "lt", "lte", "in", "like", "contains"]),
|
|
43
|
-
value: z.unknown(),
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Where expression schema for filtering
|
|
48
|
-
* Supports TanStack DB predicate push-down patterns
|
|
49
|
-
*/
|
|
50
|
-
export const WhereExpressionSchema = z.union([
|
|
51
|
-
ComparisonExpressionSchema,
|
|
52
|
-
z.object({
|
|
53
|
-
operator: z.enum(["and", "or", "not"]),
|
|
54
|
-
conditions: z.array(ComparisonExpressionSchema),
|
|
55
|
-
}),
|
|
56
|
-
]);
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Where expression type for filtering
|
|
60
|
-
* Derived from WhereExpressionSchema
|
|
61
|
-
*/
|
|
62
|
-
export type WhereExpression = z.infer<typeof WhereExpressionSchema>;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Order by expression for sorting
|
|
66
|
-
*/
|
|
67
|
-
export const OrderByExpressionSchema = z.object({
|
|
68
|
-
field: z.array(z.string()),
|
|
69
|
-
direction: z.enum(["asc", "desc"]),
|
|
70
|
-
nulls: z.enum(["first", "last"]).optional(),
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* List/Query input schema for collections
|
|
75
|
-
* Compatible with TanStack DB LoadSubsetOptions
|
|
76
|
-
*/
|
|
77
|
-
export const CollectionListInputSchema = z.object({
|
|
78
|
-
where: WhereExpressionSchema.optional().describe("Filter expression"),
|
|
79
|
-
orderBy: z
|
|
80
|
-
.array(OrderByExpressionSchema)
|
|
81
|
-
.optional()
|
|
82
|
-
.describe("Sort expressions"),
|
|
83
|
-
limit: z
|
|
84
|
-
.number()
|
|
85
|
-
.int()
|
|
86
|
-
.min(1)
|
|
87
|
-
.max(1000)
|
|
88
|
-
.optional()
|
|
89
|
-
.describe("Maximum number of items to return"),
|
|
90
|
-
offset: z
|
|
91
|
-
.number()
|
|
92
|
-
.int()
|
|
93
|
-
.min(0)
|
|
94
|
-
.optional()
|
|
95
|
-
.describe("Number of items to skip"),
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Factory function to create list output schema for a specific collection type
|
|
100
|
-
*/
|
|
101
|
-
export function createCollectionListOutputSchema<T extends z.ZodTypeAny>(
|
|
102
|
-
entitySchema: T,
|
|
103
|
-
) {
|
|
104
|
-
return z.object({
|
|
105
|
-
items: z.array(entitySchema).describe("Array of collection items"),
|
|
106
|
-
totalCount: z
|
|
107
|
-
.number()
|
|
108
|
-
.int()
|
|
109
|
-
.min(0)
|
|
110
|
-
.optional()
|
|
111
|
-
.describe("Total number of matching items (if available)"),
|
|
112
|
-
hasMore: z
|
|
113
|
-
.boolean()
|
|
114
|
-
.optional()
|
|
115
|
-
.describe("Whether there are more items available"),
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Get by ID input schema
|
|
121
|
-
*/
|
|
122
|
-
export const CollectionGetInputSchema = z.object({
|
|
123
|
-
id: z.string().describe("ID of the entity to retrieve"),
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Factory function to create get output schema
|
|
128
|
-
*/
|
|
129
|
-
export function createCollectionGetOutputSchema<T extends z.ZodTypeAny>(
|
|
130
|
-
entitySchema: T,
|
|
131
|
-
) {
|
|
132
|
-
return z.object({
|
|
133
|
-
item: entitySchema
|
|
134
|
-
.nullable()
|
|
135
|
-
.describe("The retrieved item, or null if not found"),
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Factory function to create insert input schema
|
|
141
|
-
*/
|
|
142
|
-
export function createCollectionInsertInputSchema<T extends z.ZodTypeAny>(
|
|
143
|
-
entitySchema: T,
|
|
144
|
-
) {
|
|
145
|
-
// Remove id field since it may be auto-generated by the server
|
|
146
|
-
return z.object({
|
|
147
|
-
data: entitySchema.describe(
|
|
148
|
-
"Data for the new entity (id may be auto-generated)",
|
|
149
|
-
),
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Factory function to create insert output schema
|
|
155
|
-
*/
|
|
156
|
-
export function createCollectionInsertOutputSchema<T extends z.ZodTypeAny>(
|
|
157
|
-
entitySchema: T,
|
|
158
|
-
) {
|
|
159
|
-
return z.object({
|
|
160
|
-
item: entitySchema.describe("The created entity with generated id"),
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* Factory function to create update input schema
|
|
166
|
-
*/
|
|
167
|
-
export function createCollectionUpdateInputSchema<T extends z.ZodTypeAny>(
|
|
168
|
-
entitySchema: T,
|
|
169
|
-
) {
|
|
170
|
-
return z.object({
|
|
171
|
-
id: z.string().describe("ID of the entity to update"),
|
|
172
|
-
data: (entitySchema as unknown as z.AnyZodObject)
|
|
173
|
-
.partial()
|
|
174
|
-
.describe("Partial entity data to update"),
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Factory function to create update output schema
|
|
180
|
-
*/
|
|
181
|
-
export function createCollectionUpdateOutputSchema<T extends z.ZodTypeAny>(
|
|
182
|
-
entitySchema: T,
|
|
183
|
-
) {
|
|
184
|
-
return z.object({
|
|
185
|
-
item: entitySchema.describe("The updated entity"),
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/**
|
|
190
|
-
* Delete input schema
|
|
191
|
-
*/
|
|
192
|
-
export const CollectionDeleteInputSchema = z.object({
|
|
193
|
-
id: z.string().describe("ID of the entity to delete"),
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Factory function to create delete output schema
|
|
198
|
-
*/
|
|
199
|
-
export function createCollectionDeleteOutputSchema<T extends z.ZodTypeAny>(
|
|
200
|
-
entitySchema: T,
|
|
201
|
-
) {
|
|
202
|
-
return z.object({
|
|
203
|
-
item: entitySchema.describe("The deleted entity"),
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Options for creating collection bindings
|
|
209
|
-
*/
|
|
210
|
-
export interface CollectionBindingOptions {
|
|
211
|
-
/**
|
|
212
|
-
* If true, only LIST and GET operations will be included (read-only collection)
|
|
213
|
-
* @default false
|
|
214
|
-
*/
|
|
215
|
-
readOnly?: boolean;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Creates generic collection bindings for a specific entity type
|
|
220
|
-
*
|
|
221
|
-
* This function generates standardized tool bindings that work with any collection/table
|
|
222
|
-
* by accepting a custom entity schema and collection name. The bindings provide:
|
|
223
|
-
* - COLLECTION_{NAME}_LIST - Query/search entities with filtering and sorting (required)
|
|
224
|
-
* - COLLECTION_{NAME}_GET - Get a single entity by ID (required)
|
|
225
|
-
* - COLLECTION_{NAME}_CREATE - Create a new entity (optional, excluded if readOnly=true)
|
|
226
|
-
* - COLLECTION_{NAME}_UPDATE - Update an existing entity (optional, excluded if readOnly=true)
|
|
227
|
-
* - COLLECTION_{NAME}_DELETE - Delete an entity (optional, excluded if readOnly=true)
|
|
228
|
-
*
|
|
229
|
-
* @param collectionName - The name of the collection/table (e.g., "users", "products", "orders")
|
|
230
|
-
* @param entitySchema - The Zod schema for the entity type (must extend BaseCollectionEntitySchema)
|
|
231
|
-
* @param options - Optional configuration for the collection bindings
|
|
232
|
-
* @returns Array of tool bindings for Collection CRUD + Query operations
|
|
233
|
-
*
|
|
234
|
-
* @example
|
|
235
|
-
* ```typescript
|
|
236
|
-
* const UserSchema = z.object({
|
|
237
|
-
* id: z.string(),
|
|
238
|
-
* title: z.string(),
|
|
239
|
-
* created_at: z.string().datetime(),
|
|
240
|
-
* updated_at: z.string().datetime(),
|
|
241
|
-
* created_by: z.string().optional(),
|
|
242
|
-
* updated_by: z.string().optional(),
|
|
243
|
-
* email: z.string().email(),
|
|
244
|
-
* });
|
|
245
|
-
*
|
|
246
|
-
* // Full CRUD collection
|
|
247
|
-
* const USER_COLLECTION_BINDING = createCollectionBindings("users", UserSchema);
|
|
248
|
-
*
|
|
249
|
-
* // Read-only collection (only LIST and GET)
|
|
250
|
-
* const READONLY_COLLECTION_BINDING = createCollectionBindings("products", ProductSchema, { readOnly: true });
|
|
251
|
-
* ```
|
|
252
|
-
*/
|
|
253
|
-
export function createCollectionBindings<
|
|
254
|
-
TEntitySchema extends BaseCollectionEntitySchemaType,
|
|
255
|
-
>(
|
|
256
|
-
collectionName: string,
|
|
257
|
-
entitySchema: TEntitySchema,
|
|
258
|
-
options?: CollectionBindingOptions,
|
|
259
|
-
) {
|
|
260
|
-
const upperName = collectionName.toUpperCase();
|
|
261
|
-
const readOnly = options?.readOnly ?? false;
|
|
262
|
-
|
|
263
|
-
const bindings: ToolBinder[] = [
|
|
264
|
-
{
|
|
265
|
-
name: `COLLECTION_${upperName}_LIST` as const,
|
|
266
|
-
inputSchema: CollectionListInputSchema,
|
|
267
|
-
outputSchema: createCollectionListOutputSchema(entitySchema),
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
name: `COLLECTION_${upperName}_GET` as const,
|
|
271
|
-
inputSchema: CollectionGetInputSchema,
|
|
272
|
-
outputSchema: createCollectionGetOutputSchema(entitySchema),
|
|
273
|
-
},
|
|
274
|
-
];
|
|
275
|
-
|
|
276
|
-
// Only include mutation operations if not read-only
|
|
277
|
-
if (!readOnly) {
|
|
278
|
-
bindings.push(
|
|
279
|
-
{
|
|
280
|
-
name: `COLLECTION_${upperName}_CREATE` as const,
|
|
281
|
-
inputSchema: createCollectionInsertInputSchema(entitySchema),
|
|
282
|
-
outputSchema: createCollectionInsertOutputSchema(entitySchema),
|
|
283
|
-
opt: true,
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: `COLLECTION_${upperName}_UPDATE` as const,
|
|
287
|
-
inputSchema: createCollectionUpdateInputSchema(entitySchema),
|
|
288
|
-
outputSchema: createCollectionUpdateOutputSchema(entitySchema),
|
|
289
|
-
opt: true,
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
name: `COLLECTION_${upperName}_DELETE` as const,
|
|
293
|
-
inputSchema: CollectionDeleteInputSchema,
|
|
294
|
-
outputSchema: createCollectionDeleteOutputSchema(entitySchema),
|
|
295
|
-
opt: true,
|
|
296
|
-
},
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
return bindings satisfies readonly ToolBinder[];
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* Type helper to extract the collection binding type
|
|
305
|
-
*/
|
|
306
|
-
export type CollectionBinding<
|
|
307
|
-
TEntitySchema extends BaseCollectionEntitySchemaType,
|
|
308
|
-
> = ReturnType<typeof createCollectionBindings<TEntitySchema>>;
|
|
309
|
-
|
|
310
|
-
/**
|
|
311
|
-
* Type helper to extract tool names from a collection binding
|
|
312
|
-
*/
|
|
313
|
-
export type CollectionTools<
|
|
314
|
-
TEntitySchema extends BaseCollectionEntitySchemaType,
|
|
315
|
-
> = CollectionBinding<TEntitySchema>[number]["name"];
|
|
316
|
-
|
|
317
|
-
// Export types for TypeScript usage
|
|
318
|
-
export type CollectionListInput = z.infer<typeof CollectionListInputSchema>;
|
|
319
|
-
export type CollectionGetInput = z.infer<typeof CollectionGetInputSchema>;
|
|
320
|
-
export type CollectionDeleteInput = z.infer<typeof CollectionDeleteInputSchema>;
|
|
321
|
-
export type OrderByExpression = z.infer<typeof OrderByExpressionSchema>;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Type helper for list output with generic item type
|
|
325
|
-
*/
|
|
326
|
-
export type CollectionListOutput<T> = {
|
|
327
|
-
items: T[];
|
|
328
|
-
totalCount?: number;
|
|
329
|
-
hasMore?: boolean;
|
|
330
|
-
};
|
|
331
|
-
|
|
332
|
-
/**
|
|
333
|
-
* Type helper for get output with generic item type
|
|
334
|
-
*/
|
|
335
|
-
export type CollectionGetOutput<T> = {
|
|
336
|
-
item: T | null;
|
|
337
|
-
};
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Type helper for insert output with generic item type
|
|
341
|
-
*/
|
|
342
|
-
export type CollectionInsertOutput<T> = {
|
|
343
|
-
item: T;
|
|
344
|
-
};
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Type helper for update output with generic item type
|
|
348
|
-
*/
|
|
349
|
-
export type CollectionUpdateOutput<T> = {
|
|
350
|
-
item: T;
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
/**
|
|
354
|
-
* Type helper for delete output with generic item type
|
|
355
|
-
*/
|
|
356
|
-
export type CollectionDeleteOutput<T> = {
|
|
357
|
-
item: T;
|
|
358
|
-
};
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Base collection entity type - inferred from BaseCollectionEntitySchema
|
|
362
|
-
*/
|
|
363
|
-
export type BaseCollectionEntity = z.infer<typeof BaseCollectionEntitySchema>;
|
package/src/well-known/models.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Models Well-Known Binding
|
|
3
|
-
*
|
|
4
|
-
* Defines the interface for AI model providers.
|
|
5
|
-
* Any MCP that implements this binding can provide AI models and streaming endpoints.
|
|
6
|
-
*
|
|
7
|
-
* This binding uses collection bindings for LIST and GET operations (read-only).
|
|
8
|
-
* Streaming endpoint information is included directly in the model entity schema.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { z } from "zod";
|
|
12
|
-
import type { Binder } from "../core/binder";
|
|
13
|
-
import {
|
|
14
|
-
BaseCollectionEntitySchema,
|
|
15
|
-
createCollectionBindings,
|
|
16
|
-
} from "./collections";
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Model entity schema for AI models
|
|
20
|
-
* Extends BaseCollectionEntitySchema with model-specific fields
|
|
21
|
-
* Base schema already includes: id, title, created_at, updated_at, created_by, updated_by
|
|
22
|
-
*/
|
|
23
|
-
export const ModelSchema = BaseCollectionEntitySchema.extend({
|
|
24
|
-
// Model-specific fields
|
|
25
|
-
logo: z.string().nullable(),
|
|
26
|
-
description: z.string().nullable(),
|
|
27
|
-
capabilities: z.array(z.string()),
|
|
28
|
-
limits: z
|
|
29
|
-
.object({
|
|
30
|
-
contextWindow: z.number(),
|
|
31
|
-
maxOutputTokens: z.number(),
|
|
32
|
-
})
|
|
33
|
-
.nullable(),
|
|
34
|
-
costs: z
|
|
35
|
-
.object({
|
|
36
|
-
input: z.number(),
|
|
37
|
-
output: z.number(),
|
|
38
|
-
})
|
|
39
|
-
.nullable(),
|
|
40
|
-
// Provider information
|
|
41
|
-
provider: z
|
|
42
|
-
.enum([
|
|
43
|
-
"openai",
|
|
44
|
-
"anthropic",
|
|
45
|
-
"google",
|
|
46
|
-
"xai",
|
|
47
|
-
"deepseek",
|
|
48
|
-
"openai-compatible",
|
|
49
|
-
"openrouter",
|
|
50
|
-
])
|
|
51
|
-
.nullable(),
|
|
52
|
-
// Streaming endpoint information
|
|
53
|
-
endpoint: z
|
|
54
|
-
.object({
|
|
55
|
-
url: z.string().url(),
|
|
56
|
-
method: z.string().default("POST"),
|
|
57
|
-
contentType: z.string().default("application/json"),
|
|
58
|
-
stream: z.boolean().default(true),
|
|
59
|
-
})
|
|
60
|
-
.nullable(),
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* MODELS Collection Binding
|
|
65
|
-
*
|
|
66
|
-
* Collection bindings for models (read-only).
|
|
67
|
-
* Provides LIST and GET operations for AI models.
|
|
68
|
-
*/
|
|
69
|
-
export const MODELS_COLLECTION_BINDING = createCollectionBindings(
|
|
70
|
-
"models",
|
|
71
|
-
ModelSchema,
|
|
72
|
-
{ readOnly: true },
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* MODELS Binding
|
|
77
|
-
*
|
|
78
|
-
* Defines the interface for AI model providers.
|
|
79
|
-
* Any MCP that implements this binding can provide AI models and streaming endpoints.
|
|
80
|
-
*
|
|
81
|
-
* Required tools:
|
|
82
|
-
* - COLLECTION_MODELS_LIST: List available AI models with their capabilities
|
|
83
|
-
* - COLLECTION_MODELS_GET: Get a single model by ID (includes streaming endpoint info)
|
|
84
|
-
*/
|
|
85
|
-
export const MODELS_BINDING = [
|
|
86
|
-
...MODELS_COLLECTION_BINDING,
|
|
87
|
-
] as const satisfies Binder;
|