{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cloudflare-durable-objects",
  "type": "registry:block",
  "title": "Cloudflare Durable Objects",
  "description": "Stateful coordination, realtime rooms, per-tenant state, and DO storage.",
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [],
  "files": [
    {
      "path": "apps/web/src/lib/stackfoundry/providers/cloudflare-durable-objects.ts",
      "type": "registry:file",
      "target": "apps/web/src/lib/stackfoundry/providers/cloudflare-durable-objects.ts",
      "content": "export type CloudflareDurableObjectsConfig = {\n  enabled?: boolean;\n  environment?: \"development\" | \"preview\" | \"production\";\n  metadata?: Record<string, unknown>;\n};\n\nexport function createCloudflareDurableObjectsConfig(config: CloudflareDurableObjectsConfig = {}) {\n  return {\n    enabled: config.enabled ?? true,\n    environment: config.environment ?? \"development\",\n    metadata: config.metadata ?? {},\n  };\n}\n\nexport const CloudflareDurableObjectsChecklist = [\n  \"Use Durable Objects for per-entity coordination\",\n  \"Keep object ids stable\",\n  \"Document storage and alarm behavior\",\n  \"Test concurrent requests and reconnects\"\n] as const;\n"
    },
    {
      "path": "apps/web/src/app/(console)/admin/providers/cloudflare-durable-objects/page.tsx",
      "type": "registry:page",
      "target": "apps/web/src/app/(console)/admin/providers/cloudflare-durable-objects/page.tsx",
      "content": "import { CloudflareDurableObjectsChecklist } from \"@/lib/stackfoundry/providers/cloudflare-durable-objects\";\n\nexport default function CloudflareDurableObjectsPage() {\n  return (\n    <main className=\"flex flex-col gap-6 p-6\">\n      <div>\n        <h1 className=\"text-2xl font-semibold\">Cloudflare Durable Objects</h1>\n        <p className=\"text-muted-foreground\">Stateful coordination, realtime rooms, per-tenant state, and DO storage.</p>\n      </div>\n      <div className=\"grid gap-3\">\n        {CloudflareDurableObjectsChecklist.map((check) => (\n          <div key={check} className=\"rounded-lg border p-4 text-sm\">\n            {check}\n          </div>\n        ))}\n      </div>\n    </main>\n  );\n}\n"
    },
    {
      "path": "docs/providers/cloudflare-durable-objects.md",
      "type": "registry:file",
      "target": "docs/providers/cloudflare-durable-objects.md",
      "content": "# Cloudflare Durable Objects\n\nStateful coordination, realtime rooms, per-tenant state, and DO storage.\n\n## Owns\n\n- `apps/web/src/lib/stackfoundry/providers/cloudflare-durable-objects.ts`\n- `apps/web/src/app/(console)/admin/providers/cloudflare-durable-objects/page.tsx`\n\n## Setup Checklist\n\n- Use Durable Objects for per-entity coordination\n- Keep object ids stable\n- Document storage and alarm behavior\n- Test concurrent requests and reconnects\n\n## Provider Boundary\n\nThis module documents the provider setup and app integration boundary. Keep product logic in source-owned modules and use this module when the team explicitly chooses this provider or deployment target.\n"
    }
  ],
  "maintenanceSkills": [
    {
      "name": "cloudflare-durable-objects",
      "target": ".stackfoundry/skills/cloudflare-durable-objects/SKILL.md",
      "content": "---\nname: cloudflare-durable-objects\ndescription: Maintain the Cloudflare Durable Objects module installed by StackFoundry.\n---\n\n# Cloudflare Durable Objects Maintenance Instructions\n\n- Keep module ownership clear.\n- Update docs with behavior changes.\n- Add verification steps before release.\n- Do not introduce provider lock-in outside the module boundary.\n\n## Shared Skills\n\nWhen provider, framework, or database behavior changes, load the installed shared skill before editing implementation details:\n\n- `.stackfoundry/skills/cloudflare/SKILL.md` (source: `registry/skills/cloudflare/SKILL.md`)\n\nKeep this module skill focused on ownership, installed files, env vars, deployment checks, and module-specific invariants.\n\n"
    },
    {
      "name": "cloudflare",
      "target": ".stackfoundry/skills/cloudflare/SKILL.md",
      "content": "---\nname: cloudflare\ndescription: Cloudflare platform guidance for installed Workers, storage, and edge modules.\n---\n\n# Cloudflare Guidance\n\n## Installed Location\n\n- Installed target: `.stackfoundry/skills/cloudflare/SKILL.md`\n- Registry source: `registry/skills/cloudflare/SKILL.md`\n\nAgents maintaining an installed module should load this shared skill from the installed target when provider, framework, database, SDK, or platform behavior is involved. Keep provider-specific API details here instead of duplicating them inside module maintenance skills.\n\n- Keep bindings explicit in config and docs.\n- Do not commit wrangler secrets or account credentials.\n- Document local dev, preview, and production deployment commands.\n- Verify bindings, routes, and logs after deploy.\n"
    }
  ],
  "envVars": {},
  "docs": "# Cloudflare Durable Objects\n\nStateful coordination, realtime rooms, per-tenant state, and DO storage.\n\n## Official Docs\n\n- [Cloudflare Durable Objects Docs](https://developers.cloudflare.com/durable-objects/)\n\n## Owns\n\n- `apps/web/src/lib/stackfoundry/providers/cloudflare-durable-objects.ts`\n- `apps/web/src/app/(console)/admin/providers/cloudflare-durable-objects/page.tsx`\n- `docs/providers/cloudflare-durable-objects.md`\n\n## Setup Checklist\n\n- Use Durable Objects for per-entity coordination\n- Keep object ids stable\n- Document storage and alarm behavior\n- Test concurrent requests and reconnects\n\n## Maintenance\n\n- Keep provider setup separate from product domain logic.\n- Do not commit provider credentials or generated deployment state.\n- Update docs, checklist, and source files together when provider behavior changes.\n- Verify with `pnpm stackfoundry add cloudflare-durable-objects --target /tmp/stackfoundry-cloudflare-durable-objects --dry-run`.\n",
  "meta": {
    "category": "edge",
    "env": [],
    "status": "ready",
    "maturity": "ready",
    "recommendedFor": []
  }
}
