MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / sendEmailCode

Function sendEmailCode

e2e/scenarios/connect-handoff-session.test.ts:50–65  ·  view source on GitHub ↗
(slug: string, subject: string)

Source from the content-addressed store, hash-verified

48`;
49
50const sendEmailCode = (slug: string, subject: string) => `
51const found = await tools.search({ namespace: ${JSON.stringify(slug)}, query: "send email", limit: 5 });
52const path = found.items[0]?.path;
53if (!path) return { ok: false, error: "no send tool found" };
54let t = tools;
55for (const seg of path.split(".")) t = t[seg];
56const sent = await t({
57 body: {
58 from: "onboarding@example.com",
59 to: "dev-session@example.com",
60 subject: ${JSON.stringify(subject)},
61 html: "<p>connect-handoff developer session</p>",
62 },
63});
64return { ok: sent.ok, path, result: sent.ok ? sent.data : sent.error };
65`;
66
67/** Run `execute`, auto-approving a paused execution (policy elicitation)
68 * once, and parse the sandbox's JSON return value. */

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected