@t2000/engine 0.36.3 → 0.36.4

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.js CHANGED
@@ -2377,7 +2377,7 @@ var updatePermissionsTool = buildTool({
2377
2377
  }
2378
2378
  });
2379
2379
  var PaymentLinkSchema = z.object({
2380
- amount: z.number().positive().optional().describe("Amount in USDC. Omit for open-amount links."),
2380
+ amount: z.number().positive().describe("Amount in USDC (required). Ask the user if not specified."),
2381
2381
  label: z.string().optional().describe('Human-readable label e.g. "Consulting fee March"'),
2382
2382
  memo: z.string().optional().describe("Optional note shown to the payer"),
2383
2383
  expiresInHours: z.number().positive().optional().describe("Hours until the link expires. Omit for permanent links.")
@@ -2404,17 +2404,17 @@ function internalHeaders(context) {
2404
2404
  }
2405
2405
  var createPaymentLinkTool = buildTool({
2406
2406
  name: "create_payment_link",
2407
- description: 'Create a shareable payment link so someone can send USDC to the user. Returns a URL the user can share. Payers can connect their wallet, scan a QR code, or send manually. Use when the user says "create a payment link", "generate a payment link", "I want to get paid", or similar.',
2407
+ description: 'Create a shareable payment link so someone can send USDC to the user. Amount is required \u2014 ask the user for the amount if not specified. Returns a URL the user can share. Payers can connect their wallet, scan a QR code, or send manually. Use when the user says "create a payment link", "generate a payment link", "I want to get paid", or similar.',
2408
2408
  inputSchema: PaymentLinkSchema,
2409
2409
  jsonSchema: {
2410
2410
  type: "object",
2411
2411
  properties: {
2412
- amount: { type: "number", description: "Amount in USDC. Omit for open-amount links." },
2412
+ amount: { type: "number", description: "Amount in USDC (required). Ask the user if not specified." },
2413
2413
  label: { type: "string", description: 'Human-readable label e.g. "Consulting fee March"' },
2414
2414
  memo: { type: "string", description: "Optional note shown to the payer" },
2415
2415
  expiresInHours: { type: "number", description: "Hours until the link expires. Omit for permanent links." }
2416
2416
  },
2417
- required: []
2417
+ required: ["amount"]
2418
2418
  },
2419
2419
  isReadOnly: true,
2420
2420
  async call(input, context) {
@@ -2434,7 +2434,7 @@ var createPaymentLinkTool = buildTool({
2434
2434
  return { data: null, displayText: err.error ?? "Failed to create payment link." };
2435
2435
  }
2436
2436
  const link = await res.json();
2437
- const amountStr = link.amount != null ? `$${link.amount.toFixed(2)} ${link.currency}` : `any amount ${link.currency}`;
2437
+ const amountStr = `$${link.amount.toFixed(2)} ${link.currency}`;
2438
2438
  return {
2439
2439
  data: link,
2440
2440
  displayText: `Payment link created for ${amountStr}${link.label ? ` \u2014 ${link.label}` : ""}. Payers can connect their wallet, scan the QR code, or send manually. Share: ${link.url}`