Primitives to build anything
import { createAuthenticatedFetch, kody, packageStorage,
workflows } from "kody:runtime"
export default async function main() {
const since = await packageStorage().get("sinceId")
const gh = await createAuthenticatedFetch("github")
const me = await (await gh("https://api.github.com/user")).json()
await workflows.create({ exportName: "./rebuild-index",
params: { login: me.login, since } })
return kody.emailSend({
subject: `${me.login} digest`,
text: `since ${since ?? "start"}`,
})
}