gitflarePublicPartly agent-ready50
cf-workflows-pipeline
Durable content pipeline on Cloudflare Workflows: ingest, extract, summarise with Workers AI via AI Gateway, human approval, publish.
- LicenseApache-2.0
- LanguageTypeScript
- Last landed
629b2faOct 20, 2026
Fix pipeline runs failing at ingest (steps.attempt NOT NULL)
629b2fa/** Deterministic extractive summary: first N sentences of the text. */export function extractiveSummary(text: string, length: "short" | "medium" | "long"): string { const n = length === "short" ? 2 : length === "long" ? 8 : 4; const sentences = text.replace(/\s+/g, " ").trim().match(/[^.!?]+[.!?]+(\s|$)|[^.!?]+$/g) ?? []; const out = sentences.slice(0, n).map((s) => s.trim()).join(" "); return (out || text.trim()).slice(0, 1500) || "No text available to summarise.";}