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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opentool",
3
- "version": "0.8.5",
3
+ "version": "0.8.7",
4
4
  "description": "OpenTool framework for building serverless MCP tools",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,7 +10,7 @@
10
10
  "validate": "opentool validate"
11
11
  },
12
12
  "dependencies": {
13
- "opentool": "^0.8.5",
13
+ "opentool": "^0.8.7",
14
14
  "zod": "^4.1.11"
15
15
  },
16
16
  "devDependencies": {
@@ -32,6 +32,7 @@ const AAVE_POOL_ABI = [
32
32
 
33
33
  export const profile = {
34
34
  description: "Stake 1 USDC every day at noon UTC",
35
+ category: "strategy",
35
36
  fixedAmount: "1",
36
37
  tokenSymbol: "USDC",
37
38
  schedule: { cron: "0 12 * * *", enabled: false },