Personal Telegram developer console for GitHub
docs: add Cloudflare Ops READ design
davoodmehraban89 committed
Oct 4, 2026 at 23:21 UTC
c35c5d7d5a089e509e9da2e8a29ebcc912536c6b
1 file changed
+26
docs/superpowers/specs/2026-10-04-cloudflare-ops-read-design.md
new
+26
@@ -0,0 +1,26 @@
1
+# Cloudflare Ops READ Design
2
+
3
+## Goal
4
+Add a source-backed, owner-only Cloudflare operational plugin to Nexa Dev Bot so the Telegram control plane can inspect the deployed Worker without exposing secrets or creating mutation paths.
5
+
6
+## Scope
7
+Phase 1 is READ-only. It reports the configured Worker's deployment/version, binding names and types, observability state, and provider health/error state. It does not deploy, redeploy, rollback, edit settings, or expose credential values.
8
+
9
+## Architecture
10
+Create `src/plugins/cloudflare/` as a provider/plugin boundary parallel to GitHub. `CloudflareService` owns authenticated Cloudflare API reads and normalization. The plugin exposes READ actions and Telegram views; it is registered in the central `PluginRegistry`, so policy/audit behavior remains centralized.
11
+
12
+The Worker receives non-secret `CLOUDFLARE_ACCOUNT_ID` and `CLOUDFLARE_WORKER_NAME` configuration plus a sensitive `CLOUDFLARE_API_TOKEN`. Missing provider configuration is represented explicitly as unavailable; it must never be presented as healthy. API failures are redacted into useful provider errors without returning token material.
13
+
14
+## Telegram UX
15
+Add a Cloudflare entry under operational tools/status rather than a separate misleading top-level product area. The overview shows active deployment/version, traffic allocation when supplied by the API, observability state, and binding metadata. Refresh remains in context and every view has a recovery/back route.
16
+
17
+## Security boundaries
18
+- Owner-only routing remains mandatory.
19
+- All Phase 1 actions are `READ`.
20
+- No Cloudflare mutation endpoint is implemented in this phase.
21
+- Secret values are never rendered, audited, or persisted.
22
+- Public `/status` remains minimal health-only and receives no Cloudflare operational detail.
23
+- Provider failures use explicit failure rather than synthetic success.
24
+
25
+## Testing and acceptance
26
+Use TDD. Tests cover manifest risk classes, missing configuration, normalized provider responses, redacted failures, Telegram callback length/message limits, operational navigation, and preservation of the public `/status` boundary. Full `npm test`, PR CI, preview, merge, post-merge CI/deploy, and independent Cloudflare runtime verification are required before completion.