opentool 0.8.6 → 0.8.8

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.
@@ -135,6 +135,10 @@ declare const ToolSchema: z.ZodObject<{
135
135
  }, z.core.$catchall<z.ZodAny>>>;
136
136
  chains: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
137
137
  notifyEmail: z.ZodOptional<z.ZodBoolean>;
138
+ category: z.ZodOptional<z.ZodEnum<{
139
+ strategy: "strategy";
140
+ tracker: "tracker";
141
+ }>>;
138
142
  }, z.core.$strict>;
139
143
  type Tool = z.infer<typeof ToolSchema>;
140
144
  declare const MetadataSchema: z.ZodObject<{
@@ -294,6 +298,10 @@ declare const BuildMetadataSchema: z.ZodObject<{
294
298
  }, z.core.$catchall<z.ZodAny>>>;
295
299
  chains: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
296
300
  notifyEmail: z.ZodOptional<z.ZodBoolean>;
301
+ category: z.ZodOptional<z.ZodEnum<{
302
+ strategy: "strategy";
303
+ tracker: "tracker";
304
+ }>>;
297
305
  }, z.core.$strict>>;
298
306
  discovery: z.ZodOptional<z.ZodObject<{
299
307
  keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -313,6 +321,47 @@ declare const BuildMetadataSchema: z.ZodObject<{
313
321
  }, z.core.$strict>;
314
322
  type BuildMetadata = z.infer<typeof BuildMetadataSchema>;
315
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
+
316
365
  interface ToolContent {
317
366
  type: "text" | "image" | "resource";
318
367
  text?: string;
@@ -355,6 +404,7 @@ interface InternalToolDefinition<TSchema extends z.ZodSchema | undefined = z.Zod
355
404
  schedule?: NormalizedSchedule | null;
356
405
  notifyEmail?: boolean;
357
406
  profileDescription?: string | null;
407
+ profileCategory?: ToolCategory;
358
408
  }
359
409
  interface ServerConfig {
360
410
  name: string;
@@ -391,4 +441,4 @@ declare function validateCommand(options: ValidateOptions): Promise<void>;
391
441
  declare function validateFullCommand(options: ValidateOptions): Promise<void>;
392
442
  declare function loadAndValidateTools(toolsDir: string, options?: LoadToolsOptions): Promise<InternalToolDefinition[]>;
393
443
 
394
- 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.6",
3
+ "version": "0.8.8",
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.6",
13
+ "opentool": "^0.8.8",
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 },