(slug: string, subject: string)
| 45 | `; |
| 46 | |
| 47 | const sendEmailCode = (slug: string, subject: string) => ` |
| 48 | const found = await tools.search({ namespace: ${JSON.stringify(slug)}, query: "send email", limit: 5 }); |
| 49 | const path = found.items[0]?.path; |
| 50 | if (!path) return { ok: false, error: "no send tool found" }; |
| 51 | let t = tools; |
| 52 | for (const seg of path.split(".")) t = t[seg]; |
| 53 | const 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 | }); |
| 61 | return { 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. */ |
no outgoing calls
no test coverage detected