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
629b2facf-workflows-pipeline
A durable content pipeline in a "Mission control" UI. It shows Cloudflare Workflows (step.do with retries and timeouts, step.waitForEvent human approval), Workers AI through AI Gateway, a D1 mirror of step state, and a live step timeline.
Architecture
flowchart LR
B[Browser] -->|POST /api/runs, poll 1s| W[Worker]
W -->|create / sendEvent| P[ContentPipeline Workflow]
P --> I[ingest] --> E[extract] --> S[summarise]
S -->|env.AI.run via AI Gateway| AI[Workers AI]
S --> A{{waitForEvent approval}}
A -->|approve| U[publish]
A -->|reject| R[rejected]
P -. mirror state .-> D[(D1 runs, steps, published)]
W --> D
B -->|/p/id| W
See docs/ARCHITECTURE.md and docs/API.md.
Local dev
npm install
npx wrangler d1 migrations apply DB --local
npm run dev
Tests
npm test (Vitest, Node environment) and npm run typecheck.
Deploy
npm run deploy, npm run deploy:staging. Deploying with the button or Gitflare Deploys creates the D1 databases: wrangler.jsonc deliberately has no database_id values. If deploying by hand, create the databases and add their ids.
Configuration
| Name | Kind | Purpose |
|---|---|---|
DB | D1 | runs, steps, published |
AI | Workers AI | summarisation |
PIPELINE | Workflow | ContentPipeline |
AI_GATEWAY_ID | var | AI Gateway id, default gitflare |
Costs
Workers, Workflows, D1 and Workers AI have free allowances, then usage-based billing. Each run makes one model call; if AI fails, a deterministic extractive summary is used and marked as fallback. See Cloudflare pricing for current rates.
Screenshots
Add screenshots of the timeline and approval card here.
Built with Gitflare
This repository was built by cooperating coding agents on Gitflare, verified with npx vitest run.
License
Apache-2.0