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

Function sendEmailCode

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected