opentool 0.8.9 → 0.8.11

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.
@@ -138,7 +138,7 @@ declare const ToolSchema: z.ZodObject<{
138
138
  category: z.ZodOptional<z.ZodEnum<{
139
139
  strategy: "strategy";
140
140
  tracker: "tracker";
141
- orchestator: "orchestator";
141
+ orchestrator: "orchestrator";
142
142
  }>>;
143
143
  }, z.core.$strict>;
144
144
  type Tool = z.infer<typeof ToolSchema>;
@@ -302,7 +302,7 @@ declare const BuildMetadataSchema: z.ZodObject<{
302
302
  category: z.ZodOptional<z.ZodEnum<{
303
303
  strategy: "strategy";
304
304
  tracker: "tracker";
305
- orchestator: "orchestator";
305
+ orchestrator: "orchestrator";
306
306
  }>>;
307
307
  }, z.core.$strict>>;
308
308
  discovery: z.ZodOptional<z.ZodObject<{
@@ -325,39 +325,40 @@ type BuildMetadata = z.infer<typeof BuildMetadataSchema>;
325
325
 
326
326
  type CronSpec = {
327
327
  /**
328
- * AWS EventBridge schedule expression (`cron(...)` or `rate(...)`).
328
+ * Standard 5–6 field cron expression (optionally wrapped in `cron(...)`).
329
329
  */
330
330
  cron: string;
331
331
  enabled?: boolean;
332
332
  notifyEmail?: boolean;
333
333
  };
334
- type ToolCategory = "strategy" | "tracker" | "orchestator";
335
- type ToolProfileGET = {
336
- description: string;
337
- schedule: CronSpec;
338
- fixedAmount?: string;
339
- tokenSymbol?: string;
340
- limits?: {
341
- concurrency?: number;
342
- dailyCap?: number;
343
- };
344
- category?: ToolCategory;
334
+ type ToolCategory = "strategy" | "tracker" | "orchestrator";
335
+ type ConnectedApp = {
336
+ appId: string;
337
+ deploymentId: string;
338
+ toolName: string;
339
+ displayName?: string;
340
+ method?: "GET" | "POST";
341
+ body?: unknown;
345
342
  };
346
- type ToolProfilePOST = {
343
+ type ToolProfile = {
347
344
  description?: string;
348
- notifyEmail?: boolean;
349
345
  category?: ToolCategory;
346
+ schedule?: CronSpec;
347
+ notifyEmail?: boolean;
348
+ chains?: Array<string | number>;
349
+ connectedApps?: ConnectedApp[];
350
+ policies?: Array<Record<string, unknown>>;
350
351
  };
351
352
  type GetHandler = (req: Request) => Promise<Response> | Response;
352
353
  type PostHandler = (req: Request) => Promise<Response> | Response;
353
354
  type ToolModuleGET = {
354
- profile: ToolProfileGET;
355
+ profile: ToolProfile;
355
356
  GET: GetHandler;
356
357
  POST?: never;
357
358
  schema?: never;
358
359
  };
359
360
  type ToolModulePOST<B = unknown> = {
360
- profile?: ToolProfilePOST;
361
+ profile?: ToolProfile;
361
362
  POST: PostHandler;
362
363
  schema: z.ZodType<B>;
363
364
  GET?: never;
@@ -405,6 +406,7 @@ interface InternalToolDefinition<TSchema extends z.ZodSchema | undefined = z.Zod
405
406
  payment?: X402Payment | null;
406
407
  schedule?: NormalizedSchedule | null;
407
408
  notifyEmail?: boolean;
409
+ profile?: ToolProfile | null;
408
410
  profileDescription?: string | null;
409
411
  profileCategory?: ToolCategory;
410
412
  }
@@ -443,4 +445,4 @@ declare function validateCommand(options: ValidateOptions): Promise<void>;
443
445
  declare function validateFullCommand(options: ValidateOptions): Promise<void>;
444
446
  declare function loadAndValidateTools(toolsDir: string, options?: LoadToolsOptions): Promise<InternalToolDefinition[]>;
445
447
 
446
- 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 };
448
+ 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 ConnectedApp as o, type ToolProfile 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.9",
3
+ "version": "0.8.11",
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.9",
13
+ "opentool": "^0.8.11",
14
14
  "zod": "^4.1.11"
15
15
  },
16
16
  "devDependencies": {
@@ -33,14 +33,11 @@ const AAVE_POOL_ABI = [
33
33
  export const profile = {
34
34
  description: "Stake 1 USDC every day at noon UTC",
35
35
  category: "strategy",
36
- fixedAmount: "1",
37
- tokenSymbol: "USDC",
38
36
  schedule: { cron: "0 12 * * *", enabled: false },
39
- limits: { concurrency: 1, dailyCap: 1 },
40
37
  };
41
38
 
42
39
  export async function GET(_req: Request) {
43
- const amount = profile.fixedAmount || "1";
40
+ const amount = "1";
44
41
 
45
42
  const ctx = await wallet({
46
43
  chain: "base-sepolia",