opentool 0.8.5 → 0.8.7
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/README.md +14 -0
- package/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +27 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +4 -41
- package/dist/index.js +27 -2
- package/dist/index.js.map +1 -1
- package/dist/{validate-BJ5-5n8h.d.ts → validate-3e5UvzfQ.d.ts} +54 -1
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
- package/templates/base/tools/aave-stake.ts +1 -0
|
@@ -134,6 +134,11 @@ declare const ToolSchema: z.ZodObject<{
|
|
|
134
134
|
documentation: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
135
135
|
}, z.core.$catchall<z.ZodAny>>>;
|
|
136
136
|
chains: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
137
|
+
notifyEmail: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
strategy: "strategy";
|
|
140
|
+
tracker: "tracker";
|
|
141
|
+
}>>;
|
|
137
142
|
}, z.core.$strict>;
|
|
138
143
|
type Tool = z.infer<typeof ToolSchema>;
|
|
139
144
|
declare const MetadataSchema: z.ZodObject<{
|
|
@@ -292,6 +297,11 @@ declare const BuildMetadataSchema: z.ZodObject<{
|
|
|
292
297
|
documentation: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
293
298
|
}, z.core.$catchall<z.ZodAny>>>;
|
|
294
299
|
chains: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
|
|
300
|
+
notifyEmail: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
category: z.ZodOptional<z.ZodEnum<{
|
|
302
|
+
strategy: "strategy";
|
|
303
|
+
tracker: "tracker";
|
|
304
|
+
}>>;
|
|
295
305
|
}, z.core.$strict>>;
|
|
296
306
|
discovery: z.ZodOptional<z.ZodObject<{
|
|
297
307
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -311,6 +321,47 @@ declare const BuildMetadataSchema: z.ZodObject<{
|
|
|
311
321
|
}, z.core.$strict>;
|
|
312
322
|
type BuildMetadata = z.infer<typeof BuildMetadataSchema>;
|
|
313
323
|
|
|
324
|
+
type CronSpec = {
|
|
325
|
+
/**
|
|
326
|
+
* AWS EventBridge schedule expression (`cron(...)` or `rate(...)`).
|
|
327
|
+
*/
|
|
328
|
+
cron: string;
|
|
329
|
+
enabled?: boolean;
|
|
330
|
+
notifyEmail?: boolean;
|
|
331
|
+
};
|
|
332
|
+
type ToolCategory = "strategy" | "tracker";
|
|
333
|
+
type ToolProfileGET = {
|
|
334
|
+
description: string;
|
|
335
|
+
schedule: CronSpec;
|
|
336
|
+
fixedAmount?: string;
|
|
337
|
+
tokenSymbol?: string;
|
|
338
|
+
limits?: {
|
|
339
|
+
concurrency?: number;
|
|
340
|
+
dailyCap?: number;
|
|
341
|
+
};
|
|
342
|
+
category?: ToolCategory;
|
|
343
|
+
};
|
|
344
|
+
type ToolProfilePOST = {
|
|
345
|
+
description?: string;
|
|
346
|
+
notifyEmail?: boolean;
|
|
347
|
+
category?: ToolCategory;
|
|
348
|
+
};
|
|
349
|
+
type GetHandler = (req: Request) => Promise<Response> | Response;
|
|
350
|
+
type PostHandler = (req: Request) => Promise<Response> | Response;
|
|
351
|
+
type ToolModuleGET = {
|
|
352
|
+
profile: ToolProfileGET;
|
|
353
|
+
GET: GetHandler;
|
|
354
|
+
POST?: never;
|
|
355
|
+
schema?: never;
|
|
356
|
+
};
|
|
357
|
+
type ToolModulePOST<B = unknown> = {
|
|
358
|
+
profile?: ToolProfilePOST;
|
|
359
|
+
POST: PostHandler;
|
|
360
|
+
schema: z.ZodType<B>;
|
|
361
|
+
GET?: never;
|
|
362
|
+
};
|
|
363
|
+
type ToolModule = ToolModuleGET | ToolModulePOST<any>;
|
|
364
|
+
|
|
314
365
|
interface ToolContent {
|
|
315
366
|
type: "text" | "image" | "resource";
|
|
316
367
|
text?: string;
|
|
@@ -351,7 +402,9 @@ interface InternalToolDefinition<TSchema extends z.ZodSchema | undefined = z.Zod
|
|
|
351
402
|
handler?: (params: any) => Promise<ToolResponse>;
|
|
352
403
|
payment?: X402Payment | null;
|
|
353
404
|
schedule?: NormalizedSchedule | null;
|
|
405
|
+
notifyEmail?: boolean;
|
|
354
406
|
profileDescription?: string | null;
|
|
407
|
+
profileCategory?: ToolCategory;
|
|
355
408
|
}
|
|
356
409
|
interface ServerConfig {
|
|
357
410
|
name: string;
|
|
@@ -388,4 +441,4 @@ declare function validateCommand(options: ValidateOptions): Promise<void>;
|
|
|
388
441
|
declare function validateFullCommand(options: ValidateOptions): Promise<void>;
|
|
389
442
|
declare function loadAndValidateTools(toolsDir: string, options?: LoadToolsOptions): Promise<InternalToolDefinition[]>;
|
|
390
443
|
|
|
391
|
-
export { type BuildConfig as B, type GenerateMetadataOptions as G, HTTP_METHODS as H, type InternalToolDefinition as I, type Metadata as M, type NormalizedSchedule as N, type PaymentConfig as P, type ScheduleType as S, type ToolResponse as T, type ValidateOptions as V, type GenerateMetadataResult as a, generateMetadata as b, validateFullCommand as c, type ToolContent as d, type HttpMethod as e, type HttpHandlerDefinition as f, generateMetadataCommand as g, type McpConfig as h, type ServerConfig as i, type Tool as j, type ToolMetadataOverrides as k, loadAndValidateTools as l, type BuildMetadata as m, validateCommand as v };
|
|
444
|
+
export { type BuildConfig as B, type CronSpec as C, type GenerateMetadataOptions as G, HTTP_METHODS as H, type InternalToolDefinition as I, type Metadata as M, type NormalizedSchedule as N, type PaymentConfig as P, type ScheduleType as S, type ToolResponse as T, type ValidateOptions as V, type GenerateMetadataResult as a, generateMetadata as b, validateFullCommand as c, type ToolContent as d, type HttpMethod as e, type HttpHandlerDefinition as f, generateMetadataCommand as g, type McpConfig as h, type ServerConfig as i, type Tool as j, type ToolMetadataOverrides as k, loadAndValidateTools as l, type BuildMetadata as m, type ToolCategory as n, type ToolProfileGET as o, type ToolProfilePOST as p, type GetHandler as q, type PostHandler as r, type ToolModuleGET as s, type ToolModulePOST as t, type ToolModule as u, validateCommand as v };
|
package/package.json
CHANGED