opentool 0.8.14 → 0.8.16
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/dist/cli/index.d.ts +2 -2
- package/dist/cli/index.js +12 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/{validate-CQNmvjez.d.ts → validate-BsD3SEL4.d.ts} +2 -0
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { M as Metadata, I as InternalToolDefinition } from '../validate-
|
|
3
|
-
export { G as GenerateMetadataOptions, a as GenerateMetadataResult, V as ValidateOptions, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand, c as validateFullCommand } from '../validate-
|
|
2
|
+
import { M as Metadata, I as InternalToolDefinition } from '../validate-BsD3SEL4.js';
|
|
3
|
+
export { G as GenerateMetadataOptions, a as GenerateMetadataResult, V as ValidateOptions, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand, c as validateFullCommand } from '../validate-BsD3SEL4.js';
|
|
4
4
|
import 'zod';
|
|
5
5
|
import '../x402/index.js';
|
|
6
6
|
import 'viem';
|
package/dist/cli/index.js
CHANGED
|
@@ -1165,6 +1165,18 @@ async function loadAndValidateTools(toolsDir, options = {}) {
|
|
|
1165
1165
|
`${file}: profile.assets[${index}].walletAddress must be a non-empty string when provided.`
|
|
1166
1166
|
);
|
|
1167
1167
|
}
|
|
1168
|
+
const pair = record.pair;
|
|
1169
|
+
if (pair !== void 0 && (typeof pair !== "string" || pair.trim().length === 0)) {
|
|
1170
|
+
throw new Error(
|
|
1171
|
+
`${file}: profile.assets[${index}].pair must be a non-empty string when provided.`
|
|
1172
|
+
);
|
|
1173
|
+
}
|
|
1174
|
+
const leverage = record.leverage;
|
|
1175
|
+
if (leverage !== void 0 && (typeof leverage !== "number" || !Number.isFinite(leverage) || leverage <= 0)) {
|
|
1176
|
+
throw new Error(
|
|
1177
|
+
`${file}: profile.assets[${index}].leverage must be a positive number when provided.`
|
|
1178
|
+
);
|
|
1179
|
+
}
|
|
1168
1180
|
});
|
|
1169
1181
|
}
|
|
1170
1182
|
if (hasGET && schedule && typeof schedule.cron === "string" && schedule.cron.trim().length > 0) {
|