@dbx-tools/appkit-mastra 0.1.25 → 0.1.27

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.
@@ -33,41 +33,41 @@ import { z } from "zod";
33
33
  const log = logUtils.logger("mastra/tool/send-email");
34
34
 
35
35
  const emailInputSchema = z.object({
36
- to: z.string().describe(stringUtils.toDescription`
36
+ to: z.string().describe(stringUtils.toDescription(`
37
37
  Single recipient email address (e.g. "alice@example.com"). For
38
38
  multiple recipients, comma-separate them yourself.
39
- `),
40
- subject: z.string().describe(stringUtils.toDescription`
39
+ `)),
40
+ subject: z.string().describe(stringUtils.toDescription(`
41
41
  Subject line.
42
- `),
43
- body: z.string().describe(stringUtils.toDescription`
44
- Email body. Plain text or markdown; the renderer downstream
45
- decides which to honour. Be specific - the recipient may not
46
- have any context the model has from prior chat turns.
47
- `),
42
+ `)),
43
+ body: z.string().describe(stringUtils.toDescription(`
44
+ Email body. Plain text or markdown; the renderer downstream decides
45
+ which to honour. Be specific - the recipient may not have any
46
+ context the model has from prior chat turns.
47
+ `)),
48
48
  cc: z
49
49
  .array(z.string())
50
50
  .optional()
51
- .describe(stringUtils.toDescription`
51
+ .describe(stringUtils.toDescription(`
52
52
  Optional CC recipients.
53
- `),
53
+ `)),
54
54
  bcc: z
55
55
  .array(z.string())
56
56
  .optional()
57
- .describe(stringUtils.toDescription`
57
+ .describe(stringUtils.toDescription(`
58
58
  Optional BCC recipients.
59
- `),
59
+ `)),
60
60
  });
61
61
 
62
62
  const emailOutputSchema = z.object({
63
- sent: z.boolean().describe(stringUtils.toDescription`
63
+ sent: z.boolean().describe(stringUtils.toDescription(`
64
64
  True when the email was dispatched. The current implementation
65
- always returns true after console-logging the would-be email;
66
- swap in a real provider to make this meaningful.
67
- `),
68
- recipient: z.string().describe(stringUtils.toDescription`
65
+ always returns true after console-logging the would-be email; swap
66
+ in a real provider to make this meaningful.
67
+ `)),
68
+ recipient: z.string().describe(stringUtils.toDescription(`
69
69
  Echo of the \`to\` field for confirmation.
70
- `),
70
+ `)),
71
71
  });
72
72
 
73
73
  /** Options accepted by {@link buildEmailTool}. */
@@ -111,15 +111,14 @@ export interface BuildEmailToolOptions {
111
111
  export function buildEmailTool(opts: BuildEmailToolOptions = {}) {
112
112
  return createTool({
113
113
  id: opts.id ?? "send_email",
114
- description: stringUtils.toDescription`
115
- Send an email on the user's behalf. Pass a recipient
116
- address, subject, and body; the user will be prompted to
117
- approve the send before it goes out (the tool is
118
- approval-gated). Use this when the user explicitly asks
119
- to send / forward / share something via email - never
120
- autonomously. Keep subjects short and bodies focused; the
121
- recipient may not have any of the chat context.
122
- `,
114
+ description: stringUtils.toDescription(`
115
+ Send an email on the user's behalf. Pass a recipient address,
116
+ subject, and body; the user will be prompted to approve the send
117
+ before it goes out (the tool is approval-gated). Use this when
118
+ the user explicitly asks to send / forward / share something via
119
+ email - never autonomously. Keep subjects short and bodies
120
+ focused; the recipient may not have any of the chat context.
121
+ `),
123
122
  inputSchema: emailInputSchema,
124
123
  outputSchema: emailOutputSchema,
125
124
  requireApproval: true,