Client
Path:
codemode-gateway/src/cf/client.tsRelative: src/cf/client.tsSubproject: codemode-gatewayCategory: codemode-gatewayLines: 176Bytes: 5,471Imports: 2Exports: 3
Content Preview
- import type { CfEnvelope, CfError, Env } from "../types";
- import { CloudflareApiError } from "../types";
- /**
- * Host-side Cloudflare REST API client used by the `cf` namespace.
- *
- * Network-boundary code: validates the token, applies exponential backoff +
- * jitter (3 attempts on 429 / 5xx / network errors), unwraps the standard
- * `{success, result, errors}` envelope, and throws typed `CloudflareApiError`
- * on `success:false` or non-2xx. No `console.*` in any path.
- *
- * Per ADR-2026-07-10-c