Integrate Cloudflare cf CLI and OAuth agent tooling #312

Open
opened 2026-10-11 21:23:54 +01:00 by nimmo · 3 comments
Owner

Adapt the official Cloudflare agent setup to the shared NixOS environment.

Scope:

  • Register the Cloudflare OAuth MCP endpoint in the central registry.
  • Install vendor skills for Codex and authenticate Codex/CLI independently on Electra.
  • Install the official beta cf CLI; user requires updates through the Nix flake, without a manually maintained application version or npm dependency hash.
  • Add Cloudflare’s recommended cf preference to Codex user instructions.
  • Keep generated caches and credentials outside version control.

Implementation and review: PR #314, feat/cloudflare-agent-setup. Milestone: Cloudflare Agent Tooling.

Acceptance:

  • Full flake validation and native CLI smoke checks pass.
  • Root update-policy coverage remains complete and the release/lock pair is validated together.
  • Genuine local CLI authentication/API read succeeds; confirm MCP OAuth separately.
  • Automated feedback is checked every two minutes for up to 35 minutes, with a response before pushing any review-driven fixes.
  • Merge only after the user’s explicit one-off authorization and required checks/canary evidence.
  • Keep this issue open until fleet deployment and no-op follow-up evidence are complete.

Already verified: full nix flake check, PNG rendering, disposable local Worker, command search, no-op input refresh, both OAuth logins, and a live read-only Cloudflare API request on Electra. No fleet NixOS activation yet.

Adapt the official Cloudflare agent setup to the shared NixOS environment. Scope: - Register the Cloudflare OAuth MCP endpoint in the central registry. - Install vendor skills for Codex and authenticate Codex/CLI independently on Electra. - Install the official beta cf CLI; user requires updates through the Nix flake, without a manually maintained application version or npm dependency hash. - Add Cloudflare’s recommended cf preference to Codex user instructions. - Keep generated caches and credentials outside version control. Implementation and review: PR #314, feat/cloudflare-agent-setup. Milestone: Cloudflare Agent Tooling. Acceptance: - Full flake validation and native CLI smoke checks pass. - Root update-policy coverage remains complete and the release/lock pair is validated together. - Genuine local CLI authentication/API read succeeds; confirm MCP OAuth separately. - Automated feedback is checked every two minutes for up to 35 minutes, with a response before pushing any review-driven fixes. - Merge only after the user’s explicit one-off authorization and required checks/canary evidence. - Keep this issue open until fleet deployment and no-op follow-up evidence are complete. Already verified: full nix flake check, PNG rendering, disposable local Worker, command search, no-op input refresh, both OAuth logins, and a live read-only Cloudflare API request on Electra. No fleet NixOS activation yet.
Author
Owner

Implemented locally in commit 00e8486 on feat/cloudflare-agent-setup; not published.

Validation: nix flake check passed; nixfmt and diff whitespace checks passed. Evaluated registry outputs: Codex uses Streamable HTTP without a bearer token; OpenCode has enabled=true/oauth={}; Pi has the remote URL; Antigravity and Hermes receive the same endpoint. Existing stdenv.isLinux/isDarwin warnings traced to the pinned upstream Framework tooling flake, not the Cloudflare module.

Electra: installed all 17 official vendor skills in ~/.codex/skills using the skill-installer GitHub helper, and verified the global Codex cloudflare registration. OAuth login initiated and browser authorization opened on Electra; account approval remains pending. Optional cf CLI skipped absent opt-in. Fleet deployment and MR publication have not been requested. Keep issue open for authentication/deployment evidence.

Implemented locally in commit 00e8486 on feat/cloudflare-agent-setup; not published. Validation: nix flake check passed; nixfmt and diff whitespace checks passed. Evaluated registry outputs: Codex uses Streamable HTTP without a bearer token; OpenCode has enabled=true/oauth={}; Pi has the remote URL; Antigravity and Hermes receive the same endpoint. Existing stdenv.isLinux/isDarwin warnings traced to the pinned upstream Framework tooling flake, not the Cloudflare module. Electra: installed all 17 official vendor skills in ~/.codex/skills using the skill-installer GitHub helper, and verified the global Codex cloudflare registration. OAuth login initiated and browser authorization opened on Electra; account approval remains pending. Optional cf CLI skipped absent opt-in. Fleet deployment and MR publication have not been requested. Keep issue open for authentication/deployment evidence.
Author
Owner

Follow-up completed: user opted into the beta cf CLI and explicitly requested that it follow flake updates rather than a manual version pin.

The final package reads latest-release metadata from the flake-locked npm cf/latest endpoint and runtime dependencies from Cloudflare's upstream pnpm lock, with pnpm2nix assembling integrity-checked dependencies. Release metadata/source manifest agreement is enforced; the two inputs are refreshed together by the fleet update policy. No hand-maintained application version or combined npm dependency hash remains. The pnpm2nix build input is also classified for all four AI-client hosts.

On Electra, Codex MCP login and cf's independent OAuth login are both confirmed. The installed cf successfully read the Cloudflare API. User-level Codex instructions now prefer cf except in Wrangler projects; the same instruction is in the pending Nix profile.

Validation: full nix flake check passed; dedicated package smoke check passed (command search, actual sharp PNG rendering, disposable local Miniflare Worker); all root inputs covered exactly once by update policy; a subsequent refresh of the three Cloudflare/build inputs was a no-op. Nix's libvips replaces the prebuilt image library that crashed on load; workerd and the native addon are patched for NixOS. Existing Framework tooling deprecation warnings remain unrelated.

A temporary user-profile launcher uses this validated package now and prefers Home Manager's cf after future deployment, preventing the temporary installation from masking fleet upgrades. No NixOS fleet activation, MR, or branch publication performed. Issue remains open for publication/deployment acceptance.

Follow-up completed: user opted into the beta cf CLI and explicitly requested that it follow flake updates rather than a manual version pin. The final package reads latest-release metadata from the flake-locked npm cf/latest endpoint and runtime dependencies from Cloudflare's upstream pnpm lock, with pnpm2nix assembling integrity-checked dependencies. Release metadata/source manifest agreement is enforced; the two inputs are refreshed together by the fleet update policy. No hand-maintained application version or combined npm dependency hash remains. The pnpm2nix build input is also classified for all four AI-client hosts. On Electra, Codex MCP login and cf's independent OAuth login are both confirmed. The installed cf successfully read the Cloudflare API. User-level Codex instructions now prefer cf except in Wrangler projects; the same instruction is in the pending Nix profile. Validation: full nix flake check passed; dedicated package smoke check passed (command search, actual sharp PNG rendering, disposable local Miniflare Worker); all root inputs covered exactly once by update policy; a subsequent refresh of the three Cloudflare/build inputs was a no-op. Nix's libvips replaces the prebuilt image library that crashed on load; workerd and the native addon are patched for NixOS. Existing Framework tooling deprecation warnings remain unrelated. A temporary user-profile launcher uses this validated package now and prefers Home Manager's cf after future deployment, preventing the temporary installation from masking fleet upgrades. No NixOS fleet activation, MR, or branch publication performed. Issue remains open for publication/deployment acceptance.
nimmo changed title from Add Cloudflare agent MCP setup to Integrate Cloudflare cf CLI and OAuth agent tooling 2026-10-12 00:07:47 +01:00
Author
Owner

Open-issue audit after merged PR #314: implementation/review is complete and source is in main. Read-only live evidence on Electra now confirms the normal detached auto-update switch completed successfully, active configuration revision is 3c6dbe8382, and /etc/profiles/per-user/nimmo/bin/cf resolves to the Nix-managed cloudflare-agent-cli package. The earlier statement that no NixOS activation had occurred is superseded for Electra.

Keeping this issue open because its explicit deployment/no-op follow-up acceptance is not yet complete. The inspected update journal shows the genuine switch, but no subsequent no-op update evidence; this audit did not trigger any activation or privileged updater command. Other fleet rollout acceptance is also not inferred from Electra alone.

Open-issue audit after merged PR #314: implementation/review is complete and source is in main. Read-only live evidence on Electra now confirms the normal detached auto-update switch completed successfully, active configuration revision is 3c6dbe8382a2725b710378f8c106e791a2c665da, and /etc/profiles/per-user/nimmo/bin/cf resolves to the Nix-managed cloudflare-agent-cli package. The earlier statement that no NixOS activation had occurred is superseded for Electra. Keeping this issue open because its explicit deployment/no-op follow-up acceptance is not yet complete. The inspected update journal shows the genuine switch, but no subsequent no-op update evidence; this audit did not trigger any activation or privileged updater command. Other fleet rollout acceptance is also not inferred from Electra alone.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/nixos-config#312
No description provided.