opentool 0.8.13 → 0.8.14
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 +46 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -1
- package/dist/{validate-CilU0rkD.d.ts → validate-CQNmvjez.d.ts} +8 -1
- package/package.json +1 -1
- package/templates/base/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
-
import { I as InternalToolDefinition, T as ToolResponse } from './validate-
|
|
3
|
-
export { B as BuildConfig, m as BuildMetadata,
|
|
2
|
+
import { I as InternalToolDefinition, T as ToolResponse } from './validate-CQNmvjez.js';
|
|
3
|
+
export { B as BuildConfig, m as BuildMetadata, p as ConnectedApp, C as CronSpec, r as GetHandler, H as HTTP_METHODS, f as HttpHandlerDefinition, e as HttpMethod, h as McpConfig, M as Metadata, N as NormalizedSchedule, P as PaymentConfig, s as PostHandler, S as ScheduleType, i as ServerConfig, j as Tool, o as ToolAsset, n as ToolCategory, d as ToolContent, k as ToolMetadataOverrides, w as ToolModule, t as ToolModuleGET, u as ToolModulePOST, q as ToolProfile, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand } from './validate-CQNmvjez.js';
|
|
4
4
|
export { CurrencySpec, DEFAULT_FACILITATOR, DefineX402PaymentConfig, EIP3009Authorization, PAYMENT_HEADERS, RequireX402PaymentOptions, RequireX402PaymentOutcome, RequireX402PaymentSuccess, SUPPORTED_CURRENCIES, X402BrowserClient, X402BrowserClientConfig, X402Client, X402ClientConfig, X402FacilitatorConfig, X402PayRequest, X402PayResult, X402Payment, X402PaymentContext, X402PaymentDefinition, X402PaymentRequiredError, X402VerificationResult, defineX402Payment, getX402PaymentContext, payX402, payX402WithWallet, requireX402Payment, withX402Payment } from './x402/index.js';
|
|
5
5
|
export { DEFAULT_CHAIN, DEFAULT_TOKENS, chains, getRpcUrl, registry, tokens, wallet, walletToolkit } from './wallet/index.js';
|
|
6
6
|
export { HyperliquidApiError, HyperliquidApproveBuilderFeeOptions, HyperliquidApproveBuilderFeeResponse, HyperliquidBuilderApprovalError, HyperliquidBuilderApprovalRecordInput, HyperliquidBuilderFee, HyperliquidClearinghouseState, HyperliquidDepositResult, HyperliquidEnvironment, HyperliquidExchangeClient, HyperliquidExchangeResponse, HyperliquidGrouping, HyperliquidGuardError, HyperliquidInfoClient, HyperliquidOrderIntent, HyperliquidOrderOptions, HyperliquidOrderResponse, HyperliquidOrderStatus, HyperliquidTermsError, HyperliquidTermsRecordInput, HyperliquidTriggerOptions, HyperliquidTriggerType, HyperliquidWithdrawResult, NonceSource, __hyperliquidInternals, approveHyperliquidBuilderFee, batchModifyHyperliquidOrders, cancelAllHyperliquidOrders, cancelHyperliquidOrders, cancelHyperliquidOrdersByCloid, cancelHyperliquidTwapOrder, createHyperliquidSubAccount, createMonotonicNonceFactory, depositToHyperliquidBridge, fetchHyperliquidAssetCtxs, fetchHyperliquidClearinghouseState, fetchHyperliquidFrontendOpenOrders, fetchHyperliquidHistoricalOrders, fetchHyperliquidMeta, fetchHyperliquidMetaAndAssetCtxs, fetchHyperliquidOpenOrders, fetchHyperliquidOrderStatus, fetchHyperliquidPreTransferCheck, fetchHyperliquidSpotAssetCtxs, fetchHyperliquidSpotClearinghouseState, fetchHyperliquidSpotMeta, fetchHyperliquidSpotMetaAndAssetCtxs, fetchHyperliquidUserFills, fetchHyperliquidUserFillsByTime, fetchHyperliquidUserRateLimit, getHyperliquidMaxBuilderFee, modifyHyperliquidOrder, placeHyperliquidOrder, placeHyperliquidTwapOrder, recordHyperliquidBuilderApproval, recordHyperliquidTermsAcceptance, reserveHyperliquidRequestWeight, scheduleHyperliquidCancel, sendHyperliquidSpot, setHyperliquidPortfolioMargin, transferHyperliquidSubAccount, updateHyperliquidIsolatedMargin, updateHyperliquidLeverage, withdrawFromHyperliquid } from './adapters/hyperliquid/index.js';
|
package/dist/index.js
CHANGED
|
@@ -5470,6 +5470,52 @@ async function loadAndValidateTools(toolsDir, options = {}) {
|
|
|
5470
5470
|
`${file}: profile.category must be one of ${Array.from(allowedProfileCategories).join(", ")}`
|
|
5471
5471
|
);
|
|
5472
5472
|
}
|
|
5473
|
+
const profileAssetsRaw = toolModule?.profile?.assets;
|
|
5474
|
+
if (profileAssetsRaw !== void 0) {
|
|
5475
|
+
if (!Array.isArray(profileAssetsRaw)) {
|
|
5476
|
+
throw new Error(`${file}: profile.assets must be an array.`);
|
|
5477
|
+
}
|
|
5478
|
+
profileAssetsRaw.forEach((entry, index) => {
|
|
5479
|
+
if (!entry || typeof entry !== "object") {
|
|
5480
|
+
throw new Error(
|
|
5481
|
+
`${file}: profile.assets[${index}] must be an object.`
|
|
5482
|
+
);
|
|
5483
|
+
}
|
|
5484
|
+
const record = entry;
|
|
5485
|
+
const venue = typeof record.venue === "string" ? record.venue.trim() : "";
|
|
5486
|
+
if (!venue) {
|
|
5487
|
+
throw new Error(
|
|
5488
|
+
`${file}: profile.assets[${index}].venue must be a non-empty string.`
|
|
5489
|
+
);
|
|
5490
|
+
}
|
|
5491
|
+
const chain = record.chain;
|
|
5492
|
+
if (typeof chain !== "string" && typeof chain !== "number") {
|
|
5493
|
+
throw new Error(
|
|
5494
|
+
`${file}: profile.assets[${index}].chain must be a string or number.`
|
|
5495
|
+
);
|
|
5496
|
+
}
|
|
5497
|
+
const symbols = record.assetSymbols;
|
|
5498
|
+
if (!Array.isArray(symbols) || symbols.length === 0) {
|
|
5499
|
+
throw new Error(
|
|
5500
|
+
`${file}: profile.assets[${index}].assetSymbols must be a non-empty array.`
|
|
5501
|
+
);
|
|
5502
|
+
}
|
|
5503
|
+
const invalidSymbol = symbols.find(
|
|
5504
|
+
(symbol) => typeof symbol !== "string" || symbol.trim().length === 0
|
|
5505
|
+
);
|
|
5506
|
+
if (invalidSymbol !== void 0) {
|
|
5507
|
+
throw new Error(
|
|
5508
|
+
`${file}: profile.assets[${index}].assetSymbols must be non-empty strings.`
|
|
5509
|
+
);
|
|
5510
|
+
}
|
|
5511
|
+
const walletAddress = record.walletAddress;
|
|
5512
|
+
if (walletAddress !== void 0 && (typeof walletAddress !== "string" || walletAddress.trim().length === 0)) {
|
|
5513
|
+
throw new Error(
|
|
5514
|
+
`${file}: profile.assets[${index}].walletAddress must be a non-empty string when provided.`
|
|
5515
|
+
);
|
|
5516
|
+
}
|
|
5517
|
+
});
|
|
5518
|
+
}
|
|
5473
5519
|
if (hasGET && schedule && typeof schedule.cron === "string" && schedule.cron.trim().length > 0) {
|
|
5474
5520
|
normalizedSchedule = normalizeScheduleExpression(schedule.cron, file);
|
|
5475
5521
|
if (typeof schedule.enabled === "boolean") {
|