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.
- package/README.md +3 -9
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +37 -45
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/{validate-M_QdV0J3.d.ts → validate-CilU0rkD.d.ts} +21 -19
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
- package/templates/base/tools/aave-stake.ts +1 -4
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
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" | "
|
|
335
|
-
type
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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
|
|
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:
|
|
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?:
|
|
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
|
|
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
|
@@ -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 =
|
|
40
|
+
const amount = "1";
|
|
44
41
|
|
|
45
42
|
const ctx = await wallet({
|
|
46
43
|
chain: "base-sepolia",
|