Skip to content

gitflarePublicPartly agent-ready50

cf-workflows-pipeline

Durable content pipeline on Cloudflare Workflows: ingest, extract, summarise with Workers AI via AI Gateway, human approval, publish.

Fix pipeline runs failing at ingest (steps.attempt NOT NULL)629b2fa
JavaScript13 lines982 B
import { el } from "./dom.js";const app = document.getElementById("app");const id = location.pathname.split("/").filter(Boolean).pop();try {  const r = await fetch(`/api/published/${encodeURIComponent(id)}`, { headers: { accept: "application/json" } });  if (!r.ok) throw new Error(r.status === 404 ? "This page doesn't exist or isn't published." : "Could not load page.");  const d = await r.json(); const p = d.published || d;  document.title = `${p.title || "Published"} · Mission control`;  const src = p.source_url || p.url;  app.replaceChildren(el("article", { class: "card" }, el("h1", {}, p.title || "Untitled"), el("p", { class: "summary" }, p.summary || ""),    src && /^https?:/.test(src) ? el("p", {}, "Source: ", el("a", { href: src, rel: "noopener noreferrer" }, src)) : ""));} catch (e) { app.replaceChildren(el("div", { class: "card err", role: "alert" }, el("h1", {}, "Not found"), el("p", {}, e.message), el("a", { href: "/" }, "Start a new run"))); }