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

Function sendEmailCode

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected