opentool 0.8.5 → 0.8.6

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/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-BJ5-5n8h.js';
3
- export { B as BuildConfig, m as BuildMetadata, H as HTTP_METHODS, f as HttpHandlerDefinition, e as HttpMethod, h as McpConfig, M as Metadata, N as NormalizedSchedule, P as PaymentConfig, S as ScheduleType, i as ServerConfig, j as Tool, d as ToolContent, k as ToolMetadataOverrides, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand } from './validate-BJ5-5n8h.js';
2
+ import { I as InternalToolDefinition, T as ToolResponse } from './validate-D5sE9GUm.js';
3
+ export { B as BuildConfig, m as BuildMetadata, H as HTTP_METHODS, f as HttpHandlerDefinition, e as HttpMethod, h as McpConfig, M as Metadata, N as NormalizedSchedule, P as PaymentConfig, S as ScheduleType, i as ServerConfig, j as Tool, d as ToolContent, k as ToolMetadataOverrides, b as generateMetadata, g as generateMetadataCommand, l as loadAndValidateTools, v as validateCommand } from './validate-D5sE9GUm.js';
4
4
  import { z, ZodSchema } from 'zod';
5
5
  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';
6
6
  export { DEFAULT_CHAIN, DEFAULT_TOKENS, chains, getRpcUrl, registry, tokens, wallet, walletToolkit } from './wallet/index.js';
@@ -42,6 +42,7 @@ type ToolProfileGET = {
42
42
  };
43
43
  type ToolProfilePOST = {
44
44
  description?: string;
45
+ notifyEmail?: boolean;
45
46
  };
46
47
  type GetHandler = (req: Request) => Promise<Response> | Response;
47
48
  type PostHandler = (req: Request) => Promise<Response> | Response;
package/dist/index.js CHANGED
@@ -4885,7 +4885,8 @@ var ToolSchema = z.object({
4885
4885
  annotations: McpAnnotationsSchema.optional(),
4886
4886
  payment: PaymentConfigSchema.optional(),
4887
4887
  discovery: DiscoveryMetadataSchema.optional(),
4888
- chains: z.array(z.union([z.string(), z.number()])).optional()
4888
+ chains: z.array(z.union([z.string(), z.number()])).optional(),
4889
+ notifyEmail: z.boolean().optional()
4889
4890
  }).strict();
4890
4891
  var MetadataSchema = z.object({
4891
4892
  metadataSpecVersion: z.string().optional(),
@@ -5157,6 +5158,10 @@ async function buildMetadataArtifact(options) {
5157
5158
  if (toolChains) {
5158
5159
  toolDefinition.chains = toolChains;
5159
5160
  }
5161
+ const notifyEmail = tool.notifyEmail ?? tool.schedule?.notifyEmail;
5162
+ if (notifyEmail !== void 0) {
5163
+ toolDefinition.notifyEmail = notifyEmail;
5164
+ }
5160
5165
  return toolDefinition;
5161
5166
  });
5162
5167
  const metadata = BuildMetadataSchema.parse({
@@ -5366,6 +5371,7 @@ async function loadAndValidateTools(toolsDir, options = {}) {
5366
5371
  }
5367
5372
  let normalizedSchedule = null;
5368
5373
  const schedule = toolModule?.profile?.schedule;
5374
+ const profileNotifyEmail = typeof toolModule?.profile?.notifyEmail === "boolean" ? toolModule.profile.notifyEmail : void 0;
5369
5375
  if (hasGET && schedule && typeof schedule.cron === "string" && schedule.cron.trim().length > 0) {
5370
5376
  normalizedSchedule = normalizeScheduleExpression(schedule.cron, file);
5371
5377
  if (typeof schedule.enabled === "boolean") {
@@ -5435,6 +5441,7 @@ async function loadAndValidateTools(toolsDir, options = {}) {
5435
5441
  handler: async (params) => adapter(params),
5436
5442
  payment: paymentExport ?? null,
5437
5443
  schedule: normalizedSchedule,
5444
+ ...profileNotifyEmail !== void 0 ? { notifyEmail: profileNotifyEmail } : {},
5438
5445
  profileDescription: typeof toolModule?.profile?.description === "string" ? toolModule.profile?.description ?? null : null
5439
5446
  };
5440
5447
  tools.push(tool);