[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-cloudflare-durable-objects":3,"mdc-afohz-key":37,"related-org-cloudflare-durable-objects":2937,"related-repo-cloudflare-durable-objects":3115},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":32,"sourceUrl":35,"mdContent":36},"durable-objects","build Cloudflare Durable Objects","Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"cloudflare","Cloudflare","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fcloudflare.jpg",[12,16,19,20],{"name":13,"slug":14,"type":15},"Cloudflare Workers","cloudflare-workers","tag",{"name":17,"slug":18,"type":15},"WebSockets","websockets",{"name":9,"slug":8,"type":15},{"name":21,"slug":22,"type":15},"State Management","state-management",2112,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fskills","2026-04-06T18:07:39.148434",null,192,[29,8,30,31],"agents","skills","workers",{"repoUrl":24,"stars":23,"forks":27,"topics":33,"description":34},[29,8,30,31],"Skills for teaching agents how to build on Cloudflare.","https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fdurable-objects","---\nname: durable-objects\ndescription: Create and review Cloudflare Durable Objects. Use when building stateful coordination (chat rooms, multiplayer games, booking systems), implementing RPC methods, SQLite storage, alarms, WebSockets, or reviewing DO code for best practices. Covers Workers integration, wrangler config, and testing with Vitest. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.\n---\n\n# Durable Objects\n\nBuild stateful, coordinated applications on Cloudflare's edge using Durable Objects.\n\n## Retrieval Sources\n\nYour knowledge of Durable Objects APIs and configuration may be outdated. **Prefer retrieval over pre-training** for any Durable Objects task.\n\n| Resource | URL |\n|----------|-----|\n| Docs | https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002F |\n| API Reference | https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fapi\u002F |\n| Best Practices | https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fbest-practices\u002F |\n| Examples | https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fexamples\u002F |\n\nFetch the relevant doc page when implementing features.\n\n## When to Use\n\n- Creating new Durable Object classes for stateful coordination\n- Implementing RPC methods, alarms, or WebSocket handlers\n- Reviewing existing DO code for best practices\n- Configuring wrangler.jsonc\u002Ftoml for DO bindings and migrations\n- Writing tests with `@cloudflare\u002Fvitest-pool-workers`\n- Designing sharding strategies and parent-child relationships\n\n## Reference Documentation\n\n- `.\u002Freferences\u002Frules.md` - Core rules, storage, concurrency, RPC, alarms\n- `.\u002Freferences\u002Ftesting.md` - Vitest setup, unit\u002Fintegration tests, alarm testing\n- `.\u002Freferences\u002Fworkers.md` - Workers handlers, types, wrangler config, observability\n\nSearch: `blockConcurrencyWhile`, `idFromName`, `getByName`, `setAlarm`, `sql.exec`\n\n## Core Principles\n\n### Use Durable Objects For\n\n| Need | Example |\n|------|---------|\n| Coordination | Chat rooms, multiplayer games, collaborative docs |\n| Strong consistency | Inventory, booking systems, turn-based games |\n| Per-entity storage | Multi-tenant SaaS, per-user data |\n| Persistent connections | WebSockets, real-time notifications |\n| Scheduled work per entity | Subscription renewals, game timeouts |\n\n### Do NOT Use For\n\n- Stateless request handling (use plain Workers)\n- Maximum global distribution needs\n- High fan-out independent requests\n\n## Quick Reference\n\n### Wrangler Configuration\n\n```jsonc\n\u002F\u002F wrangler.jsonc\n{\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MY_DO\", \"class_name\": \"MyDurableObject\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyDurableObject\"] }]\n}\n```\n\n### Basic Durable Object Pattern\n\n```typescript\nimport { DurableObject } from \"cloudflare:workers\";\n\nexport interface Env {\n  MY_DO: DurableObjectNamespace\u003CMyDurableObject>;\n}\n\nexport class MyDurableObject extends DurableObject\u003CEnv> {\n  constructor(ctx: DurableObjectState, env: Env) {\n    super(ctx, env);\n    ctx.blockConcurrencyWhile(async () => {\n      this.ctx.storage.sql.exec(`\n        CREATE TABLE IF NOT EXISTS items (\n          id INTEGER PRIMARY KEY AUTOINCREMENT,\n          data TEXT NOT NULL\n        )\n      `);\n    });\n  }\n\n  async addItem(data: string): Promise\u003Cnumber> {\n    const result = this.ctx.storage.sql.exec\u003C{ id: number }>(\n      \"INSERT INTO items (data) VALUES (?) RETURNING id\",\n      data\n    );\n    return result.one().id;\n  }\n}\n\nexport default {\n  async fetch(request: Request, env: Env): Promise\u003CResponse> {\n    const stub = env.MY_DO.getByName(\"my-instance\");\n    const id = await stub.addItem(\"hello\");\n    return Response.json({ id });\n  },\n};\n```\n\n## Critical Rules\n\n1. **Model around coordination atoms** - One DO per chat room\u002Fgame\u002Fuser, not one global DO\n2. **Use `getByName()` for deterministic routing** - Same input = same DO instance\n3. **Use SQLite storage** - Configure `new_sqlite_classes` in migrations\n4. **Initialize in constructor** - Use `blockConcurrencyWhile()` for schema setup only\n5. **Use RPC methods** - Not fetch() handler (compatibility date >= 2024-04-03)\n6. **Persist first, cache second** - Always write to storage before updating in-memory state\n7. **One alarm per DO** - `setAlarm()` replaces any existing alarm\n\n## Anti-Patterns (NEVER)\n\n- Single global DO handling all requests (bottleneck)\n- Using `blockConcurrencyWhile()` on every request (kills throughput)\n- Storing critical state only in memory (lost on eviction\u002Fcrash)\n- Using `await` between related storage writes (breaks atomicity)\n- Holding `blockConcurrencyWhile()` across `fetch()` or external I\u002FO\n\n## Stub Creation\n\n```typescript\n\u002F\u002F Deterministic - preferred for most cases\nconst stub = env.MY_DO.getByName(\"room-123\");\n\n\u002F\u002F From existing ID string\nconst id = env.MY_DO.idFromString(storedIdString);\nconst stub = env.MY_DO.get(id);\n\n\u002F\u002F New unique ID - store mapping externally\nconst id = env.MY_DO.newUniqueId();\nconst stub = env.MY_DO.get(id);\n```\n\n## Storage Operations\n\n```typescript\n\u002F\u002F SQL (synchronous, recommended)\nthis.ctx.storage.sql.exec(\"INSERT INTO t (c) VALUES (?)\", value);\nconst rows = this.ctx.storage.sql.exec\u003CRow>(\"SELECT * FROM t\").toArray();\n\n\u002F\u002F KV (async)\nawait this.ctx.storage.put(\"key\", value);\nconst val = await this.ctx.storage.get\u003CType>(\"key\");\n```\n\n## Alarms\n\n```typescript\n\u002F\u002F Schedule (replaces existing)\nawait this.ctx.storage.setAlarm(Date.now() + 60_000);\n\n\u002F\u002F Handler\nasync alarm(): Promise\u003Cvoid> {\n  \u002F\u002F Process scheduled work\n  \u002F\u002F Optionally reschedule: await this.ctx.storage.setAlarm(...)\n}\n\n\u002F\u002F Cancel\nawait this.ctx.storage.deleteAlarm();\n```\n\n## Testing Quick Start\n\n```typescript\nimport { env } from \"cloudflare:test\";\nimport { describe, it, expect } from \"vitest\";\n\ndescribe(\"MyDO\", () => {\n  it(\"should work\", async () => {\n    const stub = env.MY_DO.getByName(\"test\");\n    const result = await stub.addItem(\"test\");\n    expect(result).toBe(1);\n  });\n});\n```\n",{"data":38,"body":39},{"name":4,"description":6},{"type":40,"children":41},"root",[42,50,56,63,76,174,179,185,227,233,269,309,315,322,409,415,433,439,445,521,527,1505,1511,1617,1623,1680,1686,1973,1979,2316,2322,2531,2537,2931],{"type":43,"tag":44,"props":45,"children":46},"element","h1",{"id":4},[47],{"type":48,"value":49},"text","Durable Objects",{"type":43,"tag":51,"props":52,"children":53},"p",{},[54],{"type":48,"value":55},"Build stateful, coordinated applications on Cloudflare's edge using Durable Objects.",{"type":43,"tag":57,"props":58,"children":60},"h2",{"id":59},"retrieval-sources",[61],{"type":48,"value":62},"Retrieval Sources",{"type":43,"tag":51,"props":64,"children":65},{},[66,68,74],{"type":48,"value":67},"Your knowledge of Durable Objects APIs and configuration may be outdated. ",{"type":43,"tag":69,"props":70,"children":71},"strong",{},[72],{"type":48,"value":73},"Prefer retrieval over pre-training",{"type":48,"value":75}," for any Durable Objects task.",{"type":43,"tag":77,"props":78,"children":79},"table",{},[80,99],{"type":43,"tag":81,"props":82,"children":83},"thead",{},[84],{"type":43,"tag":85,"props":86,"children":87},"tr",{},[88,94],{"type":43,"tag":89,"props":90,"children":91},"th",{},[92],{"type":48,"value":93},"Resource",{"type":43,"tag":89,"props":95,"children":96},{},[97],{"type":48,"value":98},"URL",{"type":43,"tag":100,"props":101,"children":102},"tbody",{},[103,123,140,157],{"type":43,"tag":85,"props":104,"children":105},{},[106,112],{"type":43,"tag":107,"props":108,"children":109},"td",{},[110],{"type":48,"value":111},"Docs",{"type":43,"tag":107,"props":113,"children":114},{},[115],{"type":43,"tag":116,"props":117,"children":121},"a",{"href":118,"rel":119},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002F",[120],"nofollow",[122],{"type":48,"value":118},{"type":43,"tag":85,"props":124,"children":125},{},[126,131],{"type":43,"tag":107,"props":127,"children":128},{},[129],{"type":48,"value":130},"API Reference",{"type":43,"tag":107,"props":132,"children":133},{},[134],{"type":43,"tag":116,"props":135,"children":138},{"href":136,"rel":137},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fapi\u002F",[120],[139],{"type":48,"value":136},{"type":43,"tag":85,"props":141,"children":142},{},[143,148],{"type":43,"tag":107,"props":144,"children":145},{},[146],{"type":48,"value":147},"Best Practices",{"type":43,"tag":107,"props":149,"children":150},{},[151],{"type":43,"tag":116,"props":152,"children":155},{"href":153,"rel":154},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fbest-practices\u002F",[120],[156],{"type":48,"value":153},{"type":43,"tag":85,"props":158,"children":159},{},[160,165],{"type":43,"tag":107,"props":161,"children":162},{},[163],{"type":48,"value":164},"Examples",{"type":43,"tag":107,"props":166,"children":167},{},[168],{"type":43,"tag":116,"props":169,"children":172},{"href":170,"rel":171},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fexamples\u002F",[120],[173],{"type":48,"value":170},{"type":43,"tag":51,"props":175,"children":176},{},[177],{"type":48,"value":178},"Fetch the relevant doc page when implementing features.",{"type":43,"tag":57,"props":180,"children":182},{"id":181},"when-to-use",[183],{"type":48,"value":184},"When to Use",{"type":43,"tag":186,"props":187,"children":188},"ul",{},[189,195,200,205,210,222],{"type":43,"tag":190,"props":191,"children":192},"li",{},[193],{"type":48,"value":194},"Creating new Durable Object classes for stateful coordination",{"type":43,"tag":190,"props":196,"children":197},{},[198],{"type":48,"value":199},"Implementing RPC methods, alarms, or WebSocket handlers",{"type":43,"tag":190,"props":201,"children":202},{},[203],{"type":48,"value":204},"Reviewing existing DO code for best practices",{"type":43,"tag":190,"props":206,"children":207},{},[208],{"type":48,"value":209},"Configuring wrangler.jsonc\u002Ftoml for DO bindings and migrations",{"type":43,"tag":190,"props":211,"children":212},{},[213,215],{"type":48,"value":214},"Writing tests with ",{"type":43,"tag":216,"props":217,"children":219},"code",{"className":218},[],[220],{"type":48,"value":221},"@cloudflare\u002Fvitest-pool-workers",{"type":43,"tag":190,"props":223,"children":224},{},[225],{"type":48,"value":226},"Designing sharding strategies and parent-child relationships",{"type":43,"tag":57,"props":228,"children":230},{"id":229},"reference-documentation",[231],{"type":48,"value":232},"Reference Documentation",{"type":43,"tag":186,"props":234,"children":235},{},[236,247,258],{"type":43,"tag":190,"props":237,"children":238},{},[239,245],{"type":43,"tag":216,"props":240,"children":242},{"className":241},[],[243],{"type":48,"value":244},".\u002Freferences\u002Frules.md",{"type":48,"value":246}," - Core rules, storage, concurrency, RPC, alarms",{"type":43,"tag":190,"props":248,"children":249},{},[250,256],{"type":43,"tag":216,"props":251,"children":253},{"className":252},[],[254],{"type":48,"value":255},".\u002Freferences\u002Ftesting.md",{"type":48,"value":257}," - Vitest setup, unit\u002Fintegration tests, alarm testing",{"type":43,"tag":190,"props":259,"children":260},{},[261,267],{"type":43,"tag":216,"props":262,"children":264},{"className":263},[],[265],{"type":48,"value":266},".\u002Freferences\u002Fworkers.md",{"type":48,"value":268}," - Workers handlers, types, wrangler config, observability",{"type":43,"tag":51,"props":270,"children":271},{},[272,274,280,282,288,289,295,296,302,303],{"type":48,"value":273},"Search: ",{"type":43,"tag":216,"props":275,"children":277},{"className":276},[],[278],{"type":48,"value":279},"blockConcurrencyWhile",{"type":48,"value":281},", ",{"type":43,"tag":216,"props":283,"children":285},{"className":284},[],[286],{"type":48,"value":287},"idFromName",{"type":48,"value":281},{"type":43,"tag":216,"props":290,"children":292},{"className":291},[],[293],{"type":48,"value":294},"getByName",{"type":48,"value":281},{"type":43,"tag":216,"props":297,"children":299},{"className":298},[],[300],{"type":48,"value":301},"setAlarm",{"type":48,"value":281},{"type":43,"tag":216,"props":304,"children":306},{"className":305},[],[307],{"type":48,"value":308},"sql.exec",{"type":43,"tag":57,"props":310,"children":312},{"id":311},"core-principles",[313],{"type":48,"value":314},"Core Principles",{"type":43,"tag":316,"props":317,"children":319},"h3",{"id":318},"use-durable-objects-for",[320],{"type":48,"value":321},"Use Durable Objects For",{"type":43,"tag":77,"props":323,"children":324},{},[325,341],{"type":43,"tag":81,"props":326,"children":327},{},[328],{"type":43,"tag":85,"props":329,"children":330},{},[331,336],{"type":43,"tag":89,"props":332,"children":333},{},[334],{"type":48,"value":335},"Need",{"type":43,"tag":89,"props":337,"children":338},{},[339],{"type":48,"value":340},"Example",{"type":43,"tag":100,"props":342,"children":343},{},[344,357,370,383,396],{"type":43,"tag":85,"props":345,"children":346},{},[347,352],{"type":43,"tag":107,"props":348,"children":349},{},[350],{"type":48,"value":351},"Coordination",{"type":43,"tag":107,"props":353,"children":354},{},[355],{"type":48,"value":356},"Chat rooms, multiplayer games, collaborative docs",{"type":43,"tag":85,"props":358,"children":359},{},[360,365],{"type":43,"tag":107,"props":361,"children":362},{},[363],{"type":48,"value":364},"Strong consistency",{"type":43,"tag":107,"props":366,"children":367},{},[368],{"type":48,"value":369},"Inventory, booking systems, turn-based games",{"type":43,"tag":85,"props":371,"children":372},{},[373,378],{"type":43,"tag":107,"props":374,"children":375},{},[376],{"type":48,"value":377},"Per-entity storage",{"type":43,"tag":107,"props":379,"children":380},{},[381],{"type":48,"value":382},"Multi-tenant SaaS, per-user data",{"type":43,"tag":85,"props":384,"children":385},{},[386,391],{"type":43,"tag":107,"props":387,"children":388},{},[389],{"type":48,"value":390},"Persistent connections",{"type":43,"tag":107,"props":392,"children":393},{},[394],{"type":48,"value":395},"WebSockets, real-time notifications",{"type":43,"tag":85,"props":397,"children":398},{},[399,404],{"type":43,"tag":107,"props":400,"children":401},{},[402],{"type":48,"value":403},"Scheduled work per entity",{"type":43,"tag":107,"props":405,"children":406},{},[407],{"type":48,"value":408},"Subscription renewals, game timeouts",{"type":43,"tag":316,"props":410,"children":412},{"id":411},"do-not-use-for",[413],{"type":48,"value":414},"Do NOT Use For",{"type":43,"tag":186,"props":416,"children":417},{},[418,423,428],{"type":43,"tag":190,"props":419,"children":420},{},[421],{"type":48,"value":422},"Stateless request handling (use plain Workers)",{"type":43,"tag":190,"props":424,"children":425},{},[426],{"type":48,"value":427},"Maximum global distribution needs",{"type":43,"tag":190,"props":429,"children":430},{},[431],{"type":48,"value":432},"High fan-out independent requests",{"type":43,"tag":57,"props":434,"children":436},{"id":435},"quick-reference",[437],{"type":48,"value":438},"Quick Reference",{"type":43,"tag":316,"props":440,"children":442},{"id":441},"wrangler-configuration",[443],{"type":48,"value":444},"Wrangler Configuration",{"type":43,"tag":446,"props":447,"children":452},"pre",{"className":448,"code":449,"language":450,"meta":451,"style":451},"language-jsonc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F wrangler.jsonc\n{\n  \"durable_objects\": {\n    \"bindings\": [{ \"name\": \"MY_DO\", \"class_name\": \"MyDurableObject\" }]\n  },\n  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyDurableObject\"] }]\n}\n","jsonc","",[453],{"type":43,"tag":216,"props":454,"children":455},{"__ignoreMap":451},[456,467,476,485,494,503,512],{"type":43,"tag":457,"props":458,"children":461},"span",{"class":459,"line":460},"line",1,[462],{"type":43,"tag":457,"props":463,"children":464},{},[465],{"type":48,"value":466},"\u002F\u002F wrangler.jsonc\n",{"type":43,"tag":457,"props":468,"children":470},{"class":459,"line":469},2,[471],{"type":43,"tag":457,"props":472,"children":473},{},[474],{"type":48,"value":475},"{\n",{"type":43,"tag":457,"props":477,"children":479},{"class":459,"line":478},3,[480],{"type":43,"tag":457,"props":481,"children":482},{},[483],{"type":48,"value":484},"  \"durable_objects\": {\n",{"type":43,"tag":457,"props":486,"children":488},{"class":459,"line":487},4,[489],{"type":43,"tag":457,"props":490,"children":491},{},[492],{"type":48,"value":493},"    \"bindings\": [{ \"name\": \"MY_DO\", \"class_name\": \"MyDurableObject\" }]\n",{"type":43,"tag":457,"props":495,"children":497},{"class":459,"line":496},5,[498],{"type":43,"tag":457,"props":499,"children":500},{},[501],{"type":48,"value":502},"  },\n",{"type":43,"tag":457,"props":504,"children":506},{"class":459,"line":505},6,[507],{"type":43,"tag":457,"props":508,"children":509},{},[510],{"type":48,"value":511},"  \"migrations\": [{ \"tag\": \"v1\", \"new_sqlite_classes\": [\"MyDurableObject\"] }]\n",{"type":43,"tag":457,"props":513,"children":515},{"class":459,"line":514},7,[516],{"type":43,"tag":457,"props":517,"children":518},{},[519],{"type":48,"value":520},"}\n",{"type":43,"tag":316,"props":522,"children":524},{"id":523},"basic-durable-object-pattern",[525],{"type":48,"value":526},"Basic Durable Object Pattern",{"type":43,"tag":446,"props":528,"children":532},{"className":529,"code":530,"language":531,"meta":451,"style":451},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { DurableObject } from \"cloudflare:workers\";\n\nexport interface Env {\n  MY_DO: DurableObjectNamespace\u003CMyDurableObject>;\n}\n\nexport class MyDurableObject extends DurableObject\u003CEnv> {\n  constructor(ctx: DurableObjectState, env: Env) {\n    super(ctx, env);\n    ctx.blockConcurrencyWhile(async () => {\n      this.ctx.storage.sql.exec(`\n        CREATE TABLE IF NOT EXISTS items (\n          id INTEGER PRIMARY KEY AUTOINCREMENT,\n          data TEXT NOT NULL\n        )\n      `);\n    });\n  }\n\n  async addItem(data: string): Promise\u003Cnumber> {\n    const result = this.ctx.storage.sql.exec\u003C{ id: number }>(\n      \"INSERT INTO items (data) VALUES (?) RETURNING id\",\n      data\n    );\n    return result.one().id;\n  }\n}\n\nexport default {\n  async fetch(request: Request, env: Env): Promise\u003CResponse> {\n    const stub = env.MY_DO.getByName(\"my-instance\");\n    const id = await stub.addItem(\"hello\");\n    return Response.json({ id });\n  },\n};\n","typescript",[533],{"type":43,"tag":216,"props":534,"children":535},{"__ignoreMap":451},[536,588,597,622,656,663,670,714,770,803,845,894,903,912,921,930,947,964,973,981,1040,1121,1144,1153,1166,1206,1214,1222,1230,1247,1319,1382,1441,1488,1496],{"type":43,"tag":457,"props":537,"children":538},{"class":459,"line":460},[539,545,551,557,562,567,572,578,583],{"type":43,"tag":457,"props":540,"children":542},{"style":541},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[543],{"type":48,"value":544},"import",{"type":43,"tag":457,"props":546,"children":548},{"style":547},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[549],{"type":48,"value":550}," {",{"type":43,"tag":457,"props":552,"children":554},{"style":553},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[555],{"type":48,"value":556}," DurableObject",{"type":43,"tag":457,"props":558,"children":559},{"style":547},[560],{"type":48,"value":561}," }",{"type":43,"tag":457,"props":563,"children":564},{"style":541},[565],{"type":48,"value":566}," from",{"type":43,"tag":457,"props":568,"children":569},{"style":547},[570],{"type":48,"value":571}," \"",{"type":43,"tag":457,"props":573,"children":575},{"style":574},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[576],{"type":48,"value":577},"cloudflare:workers",{"type":43,"tag":457,"props":579,"children":580},{"style":547},[581],{"type":48,"value":582},"\"",{"type":43,"tag":457,"props":584,"children":585},{"style":547},[586],{"type":48,"value":587},";\n",{"type":43,"tag":457,"props":589,"children":590},{"class":459,"line":469},[591],{"type":43,"tag":457,"props":592,"children":594},{"emptyLinePlaceholder":593},true,[595],{"type":48,"value":596},"\n",{"type":43,"tag":457,"props":598,"children":599},{"class":459,"line":478},[600,605,611,617],{"type":43,"tag":457,"props":601,"children":602},{"style":541},[603],{"type":48,"value":604},"export",{"type":43,"tag":457,"props":606,"children":608},{"style":607},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[609],{"type":48,"value":610}," interface",{"type":43,"tag":457,"props":612,"children":614},{"style":613},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[615],{"type":48,"value":616}," Env",{"type":43,"tag":457,"props":618,"children":619},{"style":547},[620],{"type":48,"value":621}," {\n",{"type":43,"tag":457,"props":623,"children":624},{"class":459,"line":487},[625,631,636,641,646,651],{"type":43,"tag":457,"props":626,"children":628},{"style":627},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[629],{"type":48,"value":630},"  MY_DO",{"type":43,"tag":457,"props":632,"children":633},{"style":547},[634],{"type":48,"value":635},":",{"type":43,"tag":457,"props":637,"children":638},{"style":613},[639],{"type":48,"value":640}," DurableObjectNamespace",{"type":43,"tag":457,"props":642,"children":643},{"style":547},[644],{"type":48,"value":645},"\u003C",{"type":43,"tag":457,"props":647,"children":648},{"style":613},[649],{"type":48,"value":650},"MyDurableObject",{"type":43,"tag":457,"props":652,"children":653},{"style":547},[654],{"type":48,"value":655},">;\n",{"type":43,"tag":457,"props":657,"children":658},{"class":459,"line":496},[659],{"type":43,"tag":457,"props":660,"children":661},{"style":547},[662],{"type":48,"value":520},{"type":43,"tag":457,"props":664,"children":665},{"class":459,"line":505},[666],{"type":43,"tag":457,"props":667,"children":668},{"emptyLinePlaceholder":593},[669],{"type":48,"value":596},{"type":43,"tag":457,"props":671,"children":672},{"class":459,"line":514},[673,677,682,687,692,696,700,705,710],{"type":43,"tag":457,"props":674,"children":675},{"style":541},[676],{"type":48,"value":604},{"type":43,"tag":457,"props":678,"children":679},{"style":607},[680],{"type":48,"value":681}," class",{"type":43,"tag":457,"props":683,"children":684},{"style":613},[685],{"type":48,"value":686}," MyDurableObject",{"type":43,"tag":457,"props":688,"children":689},{"style":607},[690],{"type":48,"value":691}," extends",{"type":43,"tag":457,"props":693,"children":694},{"style":613},[695],{"type":48,"value":556},{"type":43,"tag":457,"props":697,"children":698},{"style":547},[699],{"type":48,"value":645},{"type":43,"tag":457,"props":701,"children":702},{"style":613},[703],{"type":48,"value":704},"Env",{"type":43,"tag":457,"props":706,"children":707},{"style":547},[708],{"type":48,"value":709},">",{"type":43,"tag":457,"props":711,"children":712},{"style":547},[713],{"type":48,"value":621},{"type":43,"tag":457,"props":715,"children":717},{"class":459,"line":716},8,[718,723,728,734,738,743,748,753,757,761,766],{"type":43,"tag":457,"props":719,"children":720},{"style":607},[721],{"type":48,"value":722},"  constructor",{"type":43,"tag":457,"props":724,"children":725},{"style":547},[726],{"type":48,"value":727},"(",{"type":43,"tag":457,"props":729,"children":731},{"style":730},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[732],{"type":48,"value":733},"ctx",{"type":43,"tag":457,"props":735,"children":736},{"style":547},[737],{"type":48,"value":635},{"type":43,"tag":457,"props":739,"children":740},{"style":613},[741],{"type":48,"value":742}," DurableObjectState",{"type":43,"tag":457,"props":744,"children":745},{"style":547},[746],{"type":48,"value":747},",",{"type":43,"tag":457,"props":749,"children":750},{"style":730},[751],{"type":48,"value":752}," env",{"type":43,"tag":457,"props":754,"children":755},{"style":547},[756],{"type":48,"value":635},{"type":43,"tag":457,"props":758,"children":759},{"style":613},[760],{"type":48,"value":616},{"type":43,"tag":457,"props":762,"children":763},{"style":547},[764],{"type":48,"value":765},")",{"type":43,"tag":457,"props":767,"children":768},{"style":547},[769],{"type":48,"value":621},{"type":43,"tag":457,"props":771,"children":773},{"class":459,"line":772},9,[774,779,783,787,791,795,799],{"type":43,"tag":457,"props":775,"children":776},{"style":553},[777],{"type":48,"value":778},"    super",{"type":43,"tag":457,"props":780,"children":781},{"style":627},[782],{"type":48,"value":727},{"type":43,"tag":457,"props":784,"children":785},{"style":553},[786],{"type":48,"value":733},{"type":43,"tag":457,"props":788,"children":789},{"style":547},[790],{"type":48,"value":747},{"type":43,"tag":457,"props":792,"children":793},{"style":553},[794],{"type":48,"value":752},{"type":43,"tag":457,"props":796,"children":797},{"style":627},[798],{"type":48,"value":765},{"type":43,"tag":457,"props":800,"children":801},{"style":547},[802],{"type":48,"value":587},{"type":43,"tag":457,"props":804,"children":806},{"class":459,"line":805},10,[807,812,817,822,826,831,836,841],{"type":43,"tag":457,"props":808,"children":809},{"style":553},[810],{"type":48,"value":811},"    ctx",{"type":43,"tag":457,"props":813,"children":814},{"style":547},[815],{"type":48,"value":816},".",{"type":43,"tag":457,"props":818,"children":820},{"style":819},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[821],{"type":48,"value":279},{"type":43,"tag":457,"props":823,"children":824},{"style":627},[825],{"type":48,"value":727},{"type":43,"tag":457,"props":827,"children":828},{"style":607},[829],{"type":48,"value":830},"async",{"type":43,"tag":457,"props":832,"children":833},{"style":547},[834],{"type":48,"value":835}," ()",{"type":43,"tag":457,"props":837,"children":838},{"style":607},[839],{"type":48,"value":840}," =>",{"type":43,"tag":457,"props":842,"children":843},{"style":547},[844],{"type":48,"value":621},{"type":43,"tag":457,"props":846,"children":848},{"class":459,"line":847},11,[849,854,858,862,867,871,876,880,885,889],{"type":43,"tag":457,"props":850,"children":851},{"style":547},[852],{"type":48,"value":853},"      this.",{"type":43,"tag":457,"props":855,"children":856},{"style":553},[857],{"type":48,"value":733},{"type":43,"tag":457,"props":859,"children":860},{"style":547},[861],{"type":48,"value":816},{"type":43,"tag":457,"props":863,"children":864},{"style":553},[865],{"type":48,"value":866},"storage",{"type":43,"tag":457,"props":868,"children":869},{"style":547},[870],{"type":48,"value":816},{"type":43,"tag":457,"props":872,"children":873},{"style":553},[874],{"type":48,"value":875},"sql",{"type":43,"tag":457,"props":877,"children":878},{"style":547},[879],{"type":48,"value":816},{"type":43,"tag":457,"props":881,"children":882},{"style":819},[883],{"type":48,"value":884},"exec",{"type":43,"tag":457,"props":886,"children":887},{"style":627},[888],{"type":48,"value":727},{"type":43,"tag":457,"props":890,"children":891},{"style":547},[892],{"type":48,"value":893},"`\n",{"type":43,"tag":457,"props":895,"children":897},{"class":459,"line":896},12,[898],{"type":43,"tag":457,"props":899,"children":900},{"style":574},[901],{"type":48,"value":902},"        CREATE TABLE IF NOT EXISTS items (\n",{"type":43,"tag":457,"props":904,"children":906},{"class":459,"line":905},13,[907],{"type":43,"tag":457,"props":908,"children":909},{"style":574},[910],{"type":48,"value":911},"          id INTEGER PRIMARY KEY AUTOINCREMENT,\n",{"type":43,"tag":457,"props":913,"children":915},{"class":459,"line":914},14,[916],{"type":43,"tag":457,"props":917,"children":918},{"style":574},[919],{"type":48,"value":920},"          data TEXT NOT NULL\n",{"type":43,"tag":457,"props":922,"children":924},{"class":459,"line":923},15,[925],{"type":43,"tag":457,"props":926,"children":927},{"style":574},[928],{"type":48,"value":929},"        )\n",{"type":43,"tag":457,"props":931,"children":933},{"class":459,"line":932},16,[934,939,943],{"type":43,"tag":457,"props":935,"children":936},{"style":547},[937],{"type":48,"value":938},"      `",{"type":43,"tag":457,"props":940,"children":941},{"style":627},[942],{"type":48,"value":765},{"type":43,"tag":457,"props":944,"children":945},{"style":547},[946],{"type":48,"value":587},{"type":43,"tag":457,"props":948,"children":950},{"class":459,"line":949},17,[951,956,960],{"type":43,"tag":457,"props":952,"children":953},{"style":547},[954],{"type":48,"value":955},"    }",{"type":43,"tag":457,"props":957,"children":958},{"style":627},[959],{"type":48,"value":765},{"type":43,"tag":457,"props":961,"children":962},{"style":547},[963],{"type":48,"value":587},{"type":43,"tag":457,"props":965,"children":967},{"class":459,"line":966},18,[968],{"type":43,"tag":457,"props":969,"children":970},{"style":547},[971],{"type":48,"value":972},"  }\n",{"type":43,"tag":457,"props":974,"children":976},{"class":459,"line":975},19,[977],{"type":43,"tag":457,"props":978,"children":979},{"emptyLinePlaceholder":593},[980],{"type":48,"value":596},{"type":43,"tag":457,"props":982,"children":984},{"class":459,"line":983},20,[985,990,995,999,1004,1008,1013,1018,1023,1027,1032,1036],{"type":43,"tag":457,"props":986,"children":987},{"style":607},[988],{"type":48,"value":989},"  async",{"type":43,"tag":457,"props":991,"children":992},{"style":627},[993],{"type":48,"value":994}," addItem",{"type":43,"tag":457,"props":996,"children":997},{"style":547},[998],{"type":48,"value":727},{"type":43,"tag":457,"props":1000,"children":1001},{"style":730},[1002],{"type":48,"value":1003},"data",{"type":43,"tag":457,"props":1005,"children":1006},{"style":547},[1007],{"type":48,"value":635},{"type":43,"tag":457,"props":1009,"children":1010},{"style":613},[1011],{"type":48,"value":1012}," string",{"type":43,"tag":457,"props":1014,"children":1015},{"style":547},[1016],{"type":48,"value":1017},"):",{"type":43,"tag":457,"props":1019,"children":1020},{"style":613},[1021],{"type":48,"value":1022}," Promise",{"type":43,"tag":457,"props":1024,"children":1025},{"style":547},[1026],{"type":48,"value":645},{"type":43,"tag":457,"props":1028,"children":1029},{"style":613},[1030],{"type":48,"value":1031},"number",{"type":43,"tag":457,"props":1033,"children":1034},{"style":547},[1035],{"type":48,"value":709},{"type":43,"tag":457,"props":1037,"children":1038},{"style":547},[1039],{"type":48,"value":621},{"type":43,"tag":457,"props":1041,"children":1043},{"class":459,"line":1042},21,[1044,1049,1054,1059,1064,1068,1072,1076,1080,1084,1088,1092,1097,1102,1106,1111,1116],{"type":43,"tag":457,"props":1045,"children":1046},{"style":607},[1047],{"type":48,"value":1048},"    const",{"type":43,"tag":457,"props":1050,"children":1051},{"style":553},[1052],{"type":48,"value":1053}," result",{"type":43,"tag":457,"props":1055,"children":1056},{"style":547},[1057],{"type":48,"value":1058}," =",{"type":43,"tag":457,"props":1060,"children":1061},{"style":547},[1062],{"type":48,"value":1063}," this.",{"type":43,"tag":457,"props":1065,"children":1066},{"style":553},[1067],{"type":48,"value":733},{"type":43,"tag":457,"props":1069,"children":1070},{"style":547},[1071],{"type":48,"value":816},{"type":43,"tag":457,"props":1073,"children":1074},{"style":553},[1075],{"type":48,"value":866},{"type":43,"tag":457,"props":1077,"children":1078},{"style":547},[1079],{"type":48,"value":816},{"type":43,"tag":457,"props":1081,"children":1082},{"style":553},[1083],{"type":48,"value":875},{"type":43,"tag":457,"props":1085,"children":1086},{"style":547},[1087],{"type":48,"value":816},{"type":43,"tag":457,"props":1089,"children":1090},{"style":819},[1091],{"type":48,"value":884},{"type":43,"tag":457,"props":1093,"children":1094},{"style":547},[1095],{"type":48,"value":1096},"\u003C{",{"type":43,"tag":457,"props":1098,"children":1099},{"style":627},[1100],{"type":48,"value":1101}," id",{"type":43,"tag":457,"props":1103,"children":1104},{"style":547},[1105],{"type":48,"value":635},{"type":43,"tag":457,"props":1107,"children":1108},{"style":613},[1109],{"type":48,"value":1110}," number",{"type":43,"tag":457,"props":1112,"children":1113},{"style":547},[1114],{"type":48,"value":1115}," }>",{"type":43,"tag":457,"props":1117,"children":1118},{"style":627},[1119],{"type":48,"value":1120},"(\n",{"type":43,"tag":457,"props":1122,"children":1124},{"class":459,"line":1123},22,[1125,1130,1135,1139],{"type":43,"tag":457,"props":1126,"children":1127},{"style":547},[1128],{"type":48,"value":1129},"      \"",{"type":43,"tag":457,"props":1131,"children":1132},{"style":574},[1133],{"type":48,"value":1134},"INSERT INTO items (data) VALUES (?) RETURNING id",{"type":43,"tag":457,"props":1136,"children":1137},{"style":547},[1138],{"type":48,"value":582},{"type":43,"tag":457,"props":1140,"children":1141},{"style":547},[1142],{"type":48,"value":1143},",\n",{"type":43,"tag":457,"props":1145,"children":1147},{"class":459,"line":1146},23,[1148],{"type":43,"tag":457,"props":1149,"children":1150},{"style":553},[1151],{"type":48,"value":1152},"      data\n",{"type":43,"tag":457,"props":1154,"children":1156},{"class":459,"line":1155},24,[1157,1162],{"type":43,"tag":457,"props":1158,"children":1159},{"style":627},[1160],{"type":48,"value":1161},"    )",{"type":43,"tag":457,"props":1163,"children":1164},{"style":547},[1165],{"type":48,"value":587},{"type":43,"tag":457,"props":1167,"children":1169},{"class":459,"line":1168},25,[1170,1175,1179,1183,1188,1193,1197,1202],{"type":43,"tag":457,"props":1171,"children":1172},{"style":541},[1173],{"type":48,"value":1174},"    return",{"type":43,"tag":457,"props":1176,"children":1177},{"style":553},[1178],{"type":48,"value":1053},{"type":43,"tag":457,"props":1180,"children":1181},{"style":547},[1182],{"type":48,"value":816},{"type":43,"tag":457,"props":1184,"children":1185},{"style":819},[1186],{"type":48,"value":1187},"one",{"type":43,"tag":457,"props":1189,"children":1190},{"style":627},[1191],{"type":48,"value":1192},"()",{"type":43,"tag":457,"props":1194,"children":1195},{"style":547},[1196],{"type":48,"value":816},{"type":43,"tag":457,"props":1198,"children":1199},{"style":553},[1200],{"type":48,"value":1201},"id",{"type":43,"tag":457,"props":1203,"children":1204},{"style":547},[1205],{"type":48,"value":587},{"type":43,"tag":457,"props":1207,"children":1209},{"class":459,"line":1208},26,[1210],{"type":43,"tag":457,"props":1211,"children":1212},{"style":547},[1213],{"type":48,"value":972},{"type":43,"tag":457,"props":1215,"children":1217},{"class":459,"line":1216},27,[1218],{"type":43,"tag":457,"props":1219,"children":1220},{"style":547},[1221],{"type":48,"value":520},{"type":43,"tag":457,"props":1223,"children":1225},{"class":459,"line":1224},28,[1226],{"type":43,"tag":457,"props":1227,"children":1228},{"emptyLinePlaceholder":593},[1229],{"type":48,"value":596},{"type":43,"tag":457,"props":1231,"children":1233},{"class":459,"line":1232},29,[1234,1238,1243],{"type":43,"tag":457,"props":1235,"children":1236},{"style":541},[1237],{"type":48,"value":604},{"type":43,"tag":457,"props":1239,"children":1240},{"style":541},[1241],{"type":48,"value":1242}," default",{"type":43,"tag":457,"props":1244,"children":1245},{"style":547},[1246],{"type":48,"value":621},{"type":43,"tag":457,"props":1248,"children":1250},{"class":459,"line":1249},30,[1251,1255,1260,1264,1269,1273,1278,1282,1286,1290,1294,1298,1302,1306,1311,1315],{"type":43,"tag":457,"props":1252,"children":1253},{"style":607},[1254],{"type":48,"value":989},{"type":43,"tag":457,"props":1256,"children":1257},{"style":627},[1258],{"type":48,"value":1259}," fetch",{"type":43,"tag":457,"props":1261,"children":1262},{"style":547},[1263],{"type":48,"value":727},{"type":43,"tag":457,"props":1265,"children":1266},{"style":730},[1267],{"type":48,"value":1268},"request",{"type":43,"tag":457,"props":1270,"children":1271},{"style":547},[1272],{"type":48,"value":635},{"type":43,"tag":457,"props":1274,"children":1275},{"style":613},[1276],{"type":48,"value":1277}," Request",{"type":43,"tag":457,"props":1279,"children":1280},{"style":547},[1281],{"type":48,"value":747},{"type":43,"tag":457,"props":1283,"children":1284},{"style":730},[1285],{"type":48,"value":752},{"type":43,"tag":457,"props":1287,"children":1288},{"style":547},[1289],{"type":48,"value":635},{"type":43,"tag":457,"props":1291,"children":1292},{"style":613},[1293],{"type":48,"value":616},{"type":43,"tag":457,"props":1295,"children":1296},{"style":547},[1297],{"type":48,"value":1017},{"type":43,"tag":457,"props":1299,"children":1300},{"style":613},[1301],{"type":48,"value":1022},{"type":43,"tag":457,"props":1303,"children":1304},{"style":547},[1305],{"type":48,"value":645},{"type":43,"tag":457,"props":1307,"children":1308},{"style":613},[1309],{"type":48,"value":1310},"Response",{"type":43,"tag":457,"props":1312,"children":1313},{"style":547},[1314],{"type":48,"value":709},{"type":43,"tag":457,"props":1316,"children":1317},{"style":547},[1318],{"type":48,"value":621},{"type":43,"tag":457,"props":1320,"children":1322},{"class":459,"line":1321},31,[1323,1327,1332,1336,1340,1344,1349,1353,1357,1361,1365,1370,1374,1378],{"type":43,"tag":457,"props":1324,"children":1325},{"style":607},[1326],{"type":48,"value":1048},{"type":43,"tag":457,"props":1328,"children":1329},{"style":553},[1330],{"type":48,"value":1331}," stub",{"type":43,"tag":457,"props":1333,"children":1334},{"style":547},[1335],{"type":48,"value":1058},{"type":43,"tag":457,"props":1337,"children":1338},{"style":553},[1339],{"type":48,"value":752},{"type":43,"tag":457,"props":1341,"children":1342},{"style":547},[1343],{"type":48,"value":816},{"type":43,"tag":457,"props":1345,"children":1346},{"style":553},[1347],{"type":48,"value":1348},"MY_DO",{"type":43,"tag":457,"props":1350,"children":1351},{"style":547},[1352],{"type":48,"value":816},{"type":43,"tag":457,"props":1354,"children":1355},{"style":819},[1356],{"type":48,"value":294},{"type":43,"tag":457,"props":1358,"children":1359},{"style":627},[1360],{"type":48,"value":727},{"type":43,"tag":457,"props":1362,"children":1363},{"style":547},[1364],{"type":48,"value":582},{"type":43,"tag":457,"props":1366,"children":1367},{"style":574},[1368],{"type":48,"value":1369},"my-instance",{"type":43,"tag":457,"props":1371,"children":1372},{"style":547},[1373],{"type":48,"value":582},{"type":43,"tag":457,"props":1375,"children":1376},{"style":627},[1377],{"type":48,"value":765},{"type":43,"tag":457,"props":1379,"children":1380},{"style":547},[1381],{"type":48,"value":587},{"type":43,"tag":457,"props":1383,"children":1385},{"class":459,"line":1384},32,[1386,1390,1394,1398,1403,1407,1411,1416,1420,1424,1429,1433,1437],{"type":43,"tag":457,"props":1387,"children":1388},{"style":607},[1389],{"type":48,"value":1048},{"type":43,"tag":457,"props":1391,"children":1392},{"style":553},[1393],{"type":48,"value":1101},{"type":43,"tag":457,"props":1395,"children":1396},{"style":547},[1397],{"type":48,"value":1058},{"type":43,"tag":457,"props":1399,"children":1400},{"style":541},[1401],{"type":48,"value":1402}," await",{"type":43,"tag":457,"props":1404,"children":1405},{"style":553},[1406],{"type":48,"value":1331},{"type":43,"tag":457,"props":1408,"children":1409},{"style":547},[1410],{"type":48,"value":816},{"type":43,"tag":457,"props":1412,"children":1413},{"style":819},[1414],{"type":48,"value":1415},"addItem",{"type":43,"tag":457,"props":1417,"children":1418},{"style":627},[1419],{"type":48,"value":727},{"type":43,"tag":457,"props":1421,"children":1422},{"style":547},[1423],{"type":48,"value":582},{"type":43,"tag":457,"props":1425,"children":1426},{"style":574},[1427],{"type":48,"value":1428},"hello",{"type":43,"tag":457,"props":1430,"children":1431},{"style":547},[1432],{"type":48,"value":582},{"type":43,"tag":457,"props":1434,"children":1435},{"style":627},[1436],{"type":48,"value":765},{"type":43,"tag":457,"props":1438,"children":1439},{"style":547},[1440],{"type":48,"value":587},{"type":43,"tag":457,"props":1442,"children":1444},{"class":459,"line":1443},33,[1445,1449,1454,1458,1463,1467,1472,1476,1480,1484],{"type":43,"tag":457,"props":1446,"children":1447},{"style":541},[1448],{"type":48,"value":1174},{"type":43,"tag":457,"props":1450,"children":1451},{"style":553},[1452],{"type":48,"value":1453}," Response",{"type":43,"tag":457,"props":1455,"children":1456},{"style":547},[1457],{"type":48,"value":816},{"type":43,"tag":457,"props":1459,"children":1460},{"style":819},[1461],{"type":48,"value":1462},"json",{"type":43,"tag":457,"props":1464,"children":1465},{"style":627},[1466],{"type":48,"value":727},{"type":43,"tag":457,"props":1468,"children":1469},{"style":547},[1470],{"type":48,"value":1471},"{",{"type":43,"tag":457,"props":1473,"children":1474},{"style":553},[1475],{"type":48,"value":1101},{"type":43,"tag":457,"props":1477,"children":1478},{"style":547},[1479],{"type":48,"value":561},{"type":43,"tag":457,"props":1481,"children":1482},{"style":627},[1483],{"type":48,"value":765},{"type":43,"tag":457,"props":1485,"children":1486},{"style":547},[1487],{"type":48,"value":587},{"type":43,"tag":457,"props":1489,"children":1491},{"class":459,"line":1490},34,[1492],{"type":43,"tag":457,"props":1493,"children":1494},{"style":547},[1495],{"type":48,"value":502},{"type":43,"tag":457,"props":1497,"children":1499},{"class":459,"line":1498},35,[1500],{"type":43,"tag":457,"props":1501,"children":1502},{"style":547},[1503],{"type":48,"value":1504},"};\n",{"type":43,"tag":57,"props":1506,"children":1508},{"id":1507},"critical-rules",[1509],{"type":48,"value":1510},"Critical Rules",{"type":43,"tag":1512,"props":1513,"children":1514},"ol",{},[1515,1525,1543,1561,1579,1589,1599],{"type":43,"tag":190,"props":1516,"children":1517},{},[1518,1523],{"type":43,"tag":69,"props":1519,"children":1520},{},[1521],{"type":48,"value":1522},"Model around coordination atoms",{"type":48,"value":1524}," - One DO per chat room\u002Fgame\u002Fuser, not one global DO",{"type":43,"tag":190,"props":1526,"children":1527},{},[1528,1541],{"type":43,"tag":69,"props":1529,"children":1530},{},[1531,1533,1539],{"type":48,"value":1532},"Use ",{"type":43,"tag":216,"props":1534,"children":1536},{"className":1535},[],[1537],{"type":48,"value":1538},"getByName()",{"type":48,"value":1540}," for deterministic routing",{"type":48,"value":1542}," - Same input = same DO instance",{"type":43,"tag":190,"props":1544,"children":1545},{},[1546,1551,1553,1559],{"type":43,"tag":69,"props":1547,"children":1548},{},[1549],{"type":48,"value":1550},"Use SQLite storage",{"type":48,"value":1552}," - Configure ",{"type":43,"tag":216,"props":1554,"children":1556},{"className":1555},[],[1557],{"type":48,"value":1558},"new_sqlite_classes",{"type":48,"value":1560}," in migrations",{"type":43,"tag":190,"props":1562,"children":1563},{},[1564,1569,1571,1577],{"type":43,"tag":69,"props":1565,"children":1566},{},[1567],{"type":48,"value":1568},"Initialize in constructor",{"type":48,"value":1570}," - Use ",{"type":43,"tag":216,"props":1572,"children":1574},{"className":1573},[],[1575],{"type":48,"value":1576},"blockConcurrencyWhile()",{"type":48,"value":1578}," for schema setup only",{"type":43,"tag":190,"props":1580,"children":1581},{},[1582,1587],{"type":43,"tag":69,"props":1583,"children":1584},{},[1585],{"type":48,"value":1586},"Use RPC methods",{"type":48,"value":1588}," - Not fetch() handler (compatibility date >= 2024-04-03)",{"type":43,"tag":190,"props":1590,"children":1591},{},[1592,1597],{"type":43,"tag":69,"props":1593,"children":1594},{},[1595],{"type":48,"value":1596},"Persist first, cache second",{"type":48,"value":1598}," - Always write to storage before updating in-memory state",{"type":43,"tag":190,"props":1600,"children":1601},{},[1602,1607,1609,1615],{"type":43,"tag":69,"props":1603,"children":1604},{},[1605],{"type":48,"value":1606},"One alarm per DO",{"type":48,"value":1608}," - ",{"type":43,"tag":216,"props":1610,"children":1612},{"className":1611},[],[1613],{"type":48,"value":1614},"setAlarm()",{"type":48,"value":1616}," replaces any existing alarm",{"type":43,"tag":57,"props":1618,"children":1620},{"id":1619},"anti-patterns-never",[1621],{"type":48,"value":1622},"Anti-Patterns (NEVER)",{"type":43,"tag":186,"props":1624,"children":1625},{},[1626,1631,1643,1648,1660],{"type":43,"tag":190,"props":1627,"children":1628},{},[1629],{"type":48,"value":1630},"Single global DO handling all requests (bottleneck)",{"type":43,"tag":190,"props":1632,"children":1633},{},[1634,1636,1641],{"type":48,"value":1635},"Using ",{"type":43,"tag":216,"props":1637,"children":1639},{"className":1638},[],[1640],{"type":48,"value":1576},{"type":48,"value":1642}," on every request (kills throughput)",{"type":43,"tag":190,"props":1644,"children":1645},{},[1646],{"type":48,"value":1647},"Storing critical state only in memory (lost on eviction\u002Fcrash)",{"type":43,"tag":190,"props":1649,"children":1650},{},[1651,1652,1658],{"type":48,"value":1635},{"type":43,"tag":216,"props":1653,"children":1655},{"className":1654},[],[1656],{"type":48,"value":1657},"await",{"type":48,"value":1659}," between related storage writes (breaks atomicity)",{"type":43,"tag":190,"props":1661,"children":1662},{},[1663,1665,1670,1672,1678],{"type":48,"value":1664},"Holding ",{"type":43,"tag":216,"props":1666,"children":1668},{"className":1667},[],[1669],{"type":48,"value":1576},{"type":48,"value":1671}," across ",{"type":43,"tag":216,"props":1673,"children":1675},{"className":1674},[],[1676],{"type":48,"value":1677},"fetch()",{"type":48,"value":1679}," or external I\u002FO",{"type":43,"tag":57,"props":1681,"children":1683},{"id":1682},"stub-creation",[1684],{"type":48,"value":1685},"Stub Creation",{"type":43,"tag":446,"props":1687,"children":1689},{"className":529,"code":1688,"language":531,"meta":451,"style":451},"\u002F\u002F Deterministic - preferred for most cases\nconst stub = env.MY_DO.getByName(\"room-123\");\n\n\u002F\u002F From existing ID string\nconst id = env.MY_DO.idFromString(storedIdString);\nconst stub = env.MY_DO.get(id);\n\n\u002F\u002F New unique ID - store mapping externally\nconst id = env.MY_DO.newUniqueId();\nconst stub = env.MY_DO.get(id);\n",[1690],{"type":43,"tag":216,"props":1691,"children":1692},{"__ignoreMap":451},[1693,1702,1765,1772,1780,1826,1871,1878,1886,1930],{"type":43,"tag":457,"props":1694,"children":1695},{"class":459,"line":460},[1696],{"type":43,"tag":457,"props":1697,"children":1699},{"style":1698},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1700],{"type":48,"value":1701},"\u002F\u002F Deterministic - preferred for most cases\n",{"type":43,"tag":457,"props":1703,"children":1704},{"class":459,"line":469},[1705,1710,1715,1720,1724,1728,1732,1736,1740,1744,1748,1753,1757,1761],{"type":43,"tag":457,"props":1706,"children":1707},{"style":607},[1708],{"type":48,"value":1709},"const",{"type":43,"tag":457,"props":1711,"children":1712},{"style":553},[1713],{"type":48,"value":1714}," stub ",{"type":43,"tag":457,"props":1716,"children":1717},{"style":547},[1718],{"type":48,"value":1719},"=",{"type":43,"tag":457,"props":1721,"children":1722},{"style":553},[1723],{"type":48,"value":752},{"type":43,"tag":457,"props":1725,"children":1726},{"style":547},[1727],{"type":48,"value":816},{"type":43,"tag":457,"props":1729,"children":1730},{"style":553},[1731],{"type":48,"value":1348},{"type":43,"tag":457,"props":1733,"children":1734},{"style":547},[1735],{"type":48,"value":816},{"type":43,"tag":457,"props":1737,"children":1738},{"style":819},[1739],{"type":48,"value":294},{"type":43,"tag":457,"props":1741,"children":1742},{"style":553},[1743],{"type":48,"value":727},{"type":43,"tag":457,"props":1745,"children":1746},{"style":547},[1747],{"type":48,"value":582},{"type":43,"tag":457,"props":1749,"children":1750},{"style":574},[1751],{"type":48,"value":1752},"room-123",{"type":43,"tag":457,"props":1754,"children":1755},{"style":547},[1756],{"type":48,"value":582},{"type":43,"tag":457,"props":1758,"children":1759},{"style":553},[1760],{"type":48,"value":765},{"type":43,"tag":457,"props":1762,"children":1763},{"style":547},[1764],{"type":48,"value":587},{"type":43,"tag":457,"props":1766,"children":1767},{"class":459,"line":478},[1768],{"type":43,"tag":457,"props":1769,"children":1770},{"emptyLinePlaceholder":593},[1771],{"type":48,"value":596},{"type":43,"tag":457,"props":1773,"children":1774},{"class":459,"line":487},[1775],{"type":43,"tag":457,"props":1776,"children":1777},{"style":1698},[1778],{"type":48,"value":1779},"\u002F\u002F From existing ID string\n",{"type":43,"tag":457,"props":1781,"children":1782},{"class":459,"line":496},[1783,1787,1792,1796,1800,1804,1808,1812,1817,1822],{"type":43,"tag":457,"props":1784,"children":1785},{"style":607},[1786],{"type":48,"value":1709},{"type":43,"tag":457,"props":1788,"children":1789},{"style":553},[1790],{"type":48,"value":1791}," id ",{"type":43,"tag":457,"props":1793,"children":1794},{"style":547},[1795],{"type":48,"value":1719},{"type":43,"tag":457,"props":1797,"children":1798},{"style":553},[1799],{"type":48,"value":752},{"type":43,"tag":457,"props":1801,"children":1802},{"style":547},[1803],{"type":48,"value":816},{"type":43,"tag":457,"props":1805,"children":1806},{"style":553},[1807],{"type":48,"value":1348},{"type":43,"tag":457,"props":1809,"children":1810},{"style":547},[1811],{"type":48,"value":816},{"type":43,"tag":457,"props":1813,"children":1814},{"style":819},[1815],{"type":48,"value":1816},"idFromString",{"type":43,"tag":457,"props":1818,"children":1819},{"style":553},[1820],{"type":48,"value":1821},"(storedIdString)",{"type":43,"tag":457,"props":1823,"children":1824},{"style":547},[1825],{"type":48,"value":587},{"type":43,"tag":457,"props":1827,"children":1828},{"class":459,"line":505},[1829,1833,1837,1841,1845,1849,1853,1857,1862,1867],{"type":43,"tag":457,"props":1830,"children":1831},{"style":607},[1832],{"type":48,"value":1709},{"type":43,"tag":457,"props":1834,"children":1835},{"style":553},[1836],{"type":48,"value":1714},{"type":43,"tag":457,"props":1838,"children":1839},{"style":547},[1840],{"type":48,"value":1719},{"type":43,"tag":457,"props":1842,"children":1843},{"style":553},[1844],{"type":48,"value":752},{"type":43,"tag":457,"props":1846,"children":1847},{"style":547},[1848],{"type":48,"value":816},{"type":43,"tag":457,"props":1850,"children":1851},{"style":553},[1852],{"type":48,"value":1348},{"type":43,"tag":457,"props":1854,"children":1855},{"style":547},[1856],{"type":48,"value":816},{"type":43,"tag":457,"props":1858,"children":1859},{"style":819},[1860],{"type":48,"value":1861},"get",{"type":43,"tag":457,"props":1863,"children":1864},{"style":553},[1865],{"type":48,"value":1866},"(id)",{"type":43,"tag":457,"props":1868,"children":1869},{"style":547},[1870],{"type":48,"value":587},{"type":43,"tag":457,"props":1872,"children":1873},{"class":459,"line":514},[1874],{"type":43,"tag":457,"props":1875,"children":1876},{"emptyLinePlaceholder":593},[1877],{"type":48,"value":596},{"type":43,"tag":457,"props":1879,"children":1880},{"class":459,"line":716},[1881],{"type":43,"tag":457,"props":1882,"children":1883},{"style":1698},[1884],{"type":48,"value":1885},"\u002F\u002F New unique ID - store mapping externally\n",{"type":43,"tag":457,"props":1887,"children":1888},{"class":459,"line":772},[1889,1893,1897,1901,1905,1909,1913,1917,1922,1926],{"type":43,"tag":457,"props":1890,"children":1891},{"style":607},[1892],{"type":48,"value":1709},{"type":43,"tag":457,"props":1894,"children":1895},{"style":553},[1896],{"type":48,"value":1791},{"type":43,"tag":457,"props":1898,"children":1899},{"style":547},[1900],{"type":48,"value":1719},{"type":43,"tag":457,"props":1902,"children":1903},{"style":553},[1904],{"type":48,"value":752},{"type":43,"tag":457,"props":1906,"children":1907},{"style":547},[1908],{"type":48,"value":816},{"type":43,"tag":457,"props":1910,"children":1911},{"style":553},[1912],{"type":48,"value":1348},{"type":43,"tag":457,"props":1914,"children":1915},{"style":547},[1916],{"type":48,"value":816},{"type":43,"tag":457,"props":1918,"children":1919},{"style":819},[1920],{"type":48,"value":1921},"newUniqueId",{"type":43,"tag":457,"props":1923,"children":1924},{"style":553},[1925],{"type":48,"value":1192},{"type":43,"tag":457,"props":1927,"children":1928},{"style":547},[1929],{"type":48,"value":587},{"type":43,"tag":457,"props":1931,"children":1932},{"class":459,"line":805},[1933,1937,1941,1945,1949,1953,1957,1961,1965,1969],{"type":43,"tag":457,"props":1934,"children":1935},{"style":607},[1936],{"type":48,"value":1709},{"type":43,"tag":457,"props":1938,"children":1939},{"style":553},[1940],{"type":48,"value":1714},{"type":43,"tag":457,"props":1942,"children":1943},{"style":547},[1944],{"type":48,"value":1719},{"type":43,"tag":457,"props":1946,"children":1947},{"style":553},[1948],{"type":48,"value":752},{"type":43,"tag":457,"props":1950,"children":1951},{"style":547},[1952],{"type":48,"value":816},{"type":43,"tag":457,"props":1954,"children":1955},{"style":553},[1956],{"type":48,"value":1348},{"type":43,"tag":457,"props":1958,"children":1959},{"style":547},[1960],{"type":48,"value":816},{"type":43,"tag":457,"props":1962,"children":1963},{"style":819},[1964],{"type":48,"value":1861},{"type":43,"tag":457,"props":1966,"children":1967},{"style":553},[1968],{"type":48,"value":1866},{"type":43,"tag":457,"props":1970,"children":1971},{"style":547},[1972],{"type":48,"value":587},{"type":43,"tag":57,"props":1974,"children":1976},{"id":1975},"storage-operations",[1977],{"type":48,"value":1978},"Storage Operations",{"type":43,"tag":446,"props":1980,"children":1982},{"className":529,"code":1981,"language":531,"meta":451,"style":451},"\u002F\u002F SQL (synchronous, recommended)\nthis.ctx.storage.sql.exec(\"INSERT INTO t (c) VALUES (?)\", value);\nconst rows = this.ctx.storage.sql.exec\u003CRow>(\"SELECT * FROM t\").toArray();\n\n\u002F\u002F KV (async)\nawait this.ctx.storage.put(\"key\", value);\nconst val = await this.ctx.storage.get\u003CType>(\"key\");\n",[1983],{"type":43,"tag":216,"props":1984,"children":1985},{"__ignoreMap":451},[1986,1994,2060,2159,2166,2174,2235],{"type":43,"tag":457,"props":1987,"children":1988},{"class":459,"line":460},[1989],{"type":43,"tag":457,"props":1990,"children":1991},{"style":1698},[1992],{"type":48,"value":1993},"\u002F\u002F SQL (synchronous, recommended)\n",{"type":43,"tag":457,"props":1995,"children":1996},{"class":459,"line":469},[1997,2002,2006,2010,2014,2018,2022,2026,2030,2034,2038,2043,2047,2051,2056],{"type":43,"tag":457,"props":1998,"children":1999},{"style":547},[2000],{"type":48,"value":2001},"this.",{"type":43,"tag":457,"props":2003,"children":2004},{"style":553},[2005],{"type":48,"value":733},{"type":43,"tag":457,"props":2007,"children":2008},{"style":547},[2009],{"type":48,"value":816},{"type":43,"tag":457,"props":2011,"children":2012},{"style":553},[2013],{"type":48,"value":866},{"type":43,"tag":457,"props":2015,"children":2016},{"style":547},[2017],{"type":48,"value":816},{"type":43,"tag":457,"props":2019,"children":2020},{"style":553},[2021],{"type":48,"value":875},{"type":43,"tag":457,"props":2023,"children":2024},{"style":547},[2025],{"type":48,"value":816},{"type":43,"tag":457,"props":2027,"children":2028},{"style":819},[2029],{"type":48,"value":884},{"type":43,"tag":457,"props":2031,"children":2032},{"style":553},[2033],{"type":48,"value":727},{"type":43,"tag":457,"props":2035,"children":2036},{"style":547},[2037],{"type":48,"value":582},{"type":43,"tag":457,"props":2039,"children":2040},{"style":574},[2041],{"type":48,"value":2042},"INSERT INTO t (c) VALUES (?)",{"type":43,"tag":457,"props":2044,"children":2045},{"style":547},[2046],{"type":48,"value":582},{"type":43,"tag":457,"props":2048,"children":2049},{"style":547},[2050],{"type":48,"value":747},{"type":43,"tag":457,"props":2052,"children":2053},{"style":553},[2054],{"type":48,"value":2055}," value)",{"type":43,"tag":457,"props":2057,"children":2058},{"style":547},[2059],{"type":48,"value":587},{"type":43,"tag":457,"props":2061,"children":2062},{"class":459,"line":478},[2063,2067,2072,2076,2080,2084,2088,2092,2096,2100,2104,2108,2112,2117,2121,2125,2129,2134,2138,2142,2146,2151,2155],{"type":43,"tag":457,"props":2064,"children":2065},{"style":607},[2066],{"type":48,"value":1709},{"type":43,"tag":457,"props":2068,"children":2069},{"style":553},[2070],{"type":48,"value":2071}," rows ",{"type":43,"tag":457,"props":2073,"children":2074},{"style":547},[2075],{"type":48,"value":1719},{"type":43,"tag":457,"props":2077,"children":2078},{"style":547},[2079],{"type":48,"value":1063},{"type":43,"tag":457,"props":2081,"children":2082},{"style":553},[2083],{"type":48,"value":733},{"type":43,"tag":457,"props":2085,"children":2086},{"style":547},[2087],{"type":48,"value":816},{"type":43,"tag":457,"props":2089,"children":2090},{"style":553},[2091],{"type":48,"value":866},{"type":43,"tag":457,"props":2093,"children":2094},{"style":547},[2095],{"type":48,"value":816},{"type":43,"tag":457,"props":2097,"children":2098},{"style":553},[2099],{"type":48,"value":875},{"type":43,"tag":457,"props":2101,"children":2102},{"style":547},[2103],{"type":48,"value":816},{"type":43,"tag":457,"props":2105,"children":2106},{"style":819},[2107],{"type":48,"value":884},{"type":43,"tag":457,"props":2109,"children":2110},{"style":547},[2111],{"type":48,"value":645},{"type":43,"tag":457,"props":2113,"children":2114},{"style":613},[2115],{"type":48,"value":2116},"Row",{"type":43,"tag":457,"props":2118,"children":2119},{"style":547},[2120],{"type":48,"value":709},{"type":43,"tag":457,"props":2122,"children":2123},{"style":553},[2124],{"type":48,"value":727},{"type":43,"tag":457,"props":2126,"children":2127},{"style":547},[2128],{"type":48,"value":582},{"type":43,"tag":457,"props":2130,"children":2131},{"style":574},[2132],{"type":48,"value":2133},"SELECT * FROM t",{"type":43,"tag":457,"props":2135,"children":2136},{"style":547},[2137],{"type":48,"value":582},{"type":43,"tag":457,"props":2139,"children":2140},{"style":553},[2141],{"type":48,"value":765},{"type":43,"tag":457,"props":2143,"children":2144},{"style":547},[2145],{"type":48,"value":816},{"type":43,"tag":457,"props":2147,"children":2148},{"style":819},[2149],{"type":48,"value":2150},"toArray",{"type":43,"tag":457,"props":2152,"children":2153},{"style":553},[2154],{"type":48,"value":1192},{"type":43,"tag":457,"props":2156,"children":2157},{"style":547},[2158],{"type":48,"value":587},{"type":43,"tag":457,"props":2160,"children":2161},{"class":459,"line":487},[2162],{"type":43,"tag":457,"props":2163,"children":2164},{"emptyLinePlaceholder":593},[2165],{"type":48,"value":596},{"type":43,"tag":457,"props":2167,"children":2168},{"class":459,"line":496},[2169],{"type":43,"tag":457,"props":2170,"children":2171},{"style":1698},[2172],{"type":48,"value":2173},"\u002F\u002F KV (async)\n",{"type":43,"tag":457,"props":2175,"children":2176},{"class":459,"line":505},[2177,2181,2185,2189,2193,2197,2201,2206,2210,2214,2219,2223,2227,2231],{"type":43,"tag":457,"props":2178,"children":2179},{"style":541},[2180],{"type":48,"value":1657},{"type":43,"tag":457,"props":2182,"children":2183},{"style":547},[2184],{"type":48,"value":1063},{"type":43,"tag":457,"props":2186,"children":2187},{"style":553},[2188],{"type":48,"value":733},{"type":43,"tag":457,"props":2190,"children":2191},{"style":547},[2192],{"type":48,"value":816},{"type":43,"tag":457,"props":2194,"children":2195},{"style":553},[2196],{"type":48,"value":866},{"type":43,"tag":457,"props":2198,"children":2199},{"style":547},[2200],{"type":48,"value":816},{"type":43,"tag":457,"props":2202,"children":2203},{"style":819},[2204],{"type":48,"value":2205},"put",{"type":43,"tag":457,"props":2207,"children":2208},{"style":553},[2209],{"type":48,"value":727},{"type":43,"tag":457,"props":2211,"children":2212},{"style":547},[2213],{"type":48,"value":582},{"type":43,"tag":457,"props":2215,"children":2216},{"style":574},[2217],{"type":48,"value":2218},"key",{"type":43,"tag":457,"props":2220,"children":2221},{"style":547},[2222],{"type":48,"value":582},{"type":43,"tag":457,"props":2224,"children":2225},{"style":547},[2226],{"type":48,"value":747},{"type":43,"tag":457,"props":2228,"children":2229},{"style":553},[2230],{"type":48,"value":2055},{"type":43,"tag":457,"props":2232,"children":2233},{"style":547},[2234],{"type":48,"value":587},{"type":43,"tag":457,"props":2236,"children":2237},{"class":459,"line":514},[2238,2242,2247,2251,2255,2259,2263,2267,2271,2275,2279,2283,2288,2292,2296,2300,2304,2308,2312],{"type":43,"tag":457,"props":2239,"children":2240},{"style":607},[2241],{"type":48,"value":1709},{"type":43,"tag":457,"props":2243,"children":2244},{"style":553},[2245],{"type":48,"value":2246}," val ",{"type":43,"tag":457,"props":2248,"children":2249},{"style":547},[2250],{"type":48,"value":1719},{"type":43,"tag":457,"props":2252,"children":2253},{"style":541},[2254],{"type":48,"value":1402},{"type":43,"tag":457,"props":2256,"children":2257},{"style":547},[2258],{"type":48,"value":1063},{"type":43,"tag":457,"props":2260,"children":2261},{"style":553},[2262],{"type":48,"value":733},{"type":43,"tag":457,"props":2264,"children":2265},{"style":547},[2266],{"type":48,"value":816},{"type":43,"tag":457,"props":2268,"children":2269},{"style":553},[2270],{"type":48,"value":866},{"type":43,"tag":457,"props":2272,"children":2273},{"style":547},[2274],{"type":48,"value":816},{"type":43,"tag":457,"props":2276,"children":2277},{"style":819},[2278],{"type":48,"value":1861},{"type":43,"tag":457,"props":2280,"children":2281},{"style":547},[2282],{"type":48,"value":645},{"type":43,"tag":457,"props":2284,"children":2285},{"style":613},[2286],{"type":48,"value":2287},"Type",{"type":43,"tag":457,"props":2289,"children":2290},{"style":547},[2291],{"type":48,"value":709},{"type":43,"tag":457,"props":2293,"children":2294},{"style":553},[2295],{"type":48,"value":727},{"type":43,"tag":457,"props":2297,"children":2298},{"style":547},[2299],{"type":48,"value":582},{"type":43,"tag":457,"props":2301,"children":2302},{"style":574},[2303],{"type":48,"value":2218},{"type":43,"tag":457,"props":2305,"children":2306},{"style":547},[2307],{"type":48,"value":582},{"type":43,"tag":457,"props":2309,"children":2310},{"style":553},[2311],{"type":48,"value":765},{"type":43,"tag":457,"props":2313,"children":2314},{"style":547},[2315],{"type":48,"value":587},{"type":43,"tag":57,"props":2317,"children":2319},{"id":2318},"alarms",[2320],{"type":48,"value":2321},"Alarms",{"type":43,"tag":446,"props":2323,"children":2325},{"className":529,"code":2324,"language":531,"meta":451,"style":451},"\u002F\u002F Schedule (replaces existing)\nawait this.ctx.storage.setAlarm(Date.now() + 60_000);\n\n\u002F\u002F Handler\nasync alarm(): Promise\u003Cvoid> {\n  \u002F\u002F Process scheduled work\n  \u002F\u002F Optionally reschedule: await this.ctx.storage.setAlarm(...)\n}\n\n\u002F\u002F Cancel\nawait this.ctx.storage.deleteAlarm();\n",[2326],{"type":43,"tag":216,"props":2327,"children":2328},{"__ignoreMap":451},[2329,2337,2406,2413,2421,2453,2461,2469,2476,2483,2491],{"type":43,"tag":457,"props":2330,"children":2331},{"class":459,"line":460},[2332],{"type":43,"tag":457,"props":2333,"children":2334},{"style":1698},[2335],{"type":48,"value":2336},"\u002F\u002F Schedule (replaces existing)\n",{"type":43,"tag":457,"props":2338,"children":2339},{"class":459,"line":469},[2340,2344,2348,2352,2356,2360,2364,2368,2373,2377,2382,2387,2392,2398,2402],{"type":43,"tag":457,"props":2341,"children":2342},{"style":541},[2343],{"type":48,"value":1657},{"type":43,"tag":457,"props":2345,"children":2346},{"style":547},[2347],{"type":48,"value":1063},{"type":43,"tag":457,"props":2349,"children":2350},{"style":553},[2351],{"type":48,"value":733},{"type":43,"tag":457,"props":2353,"children":2354},{"style":547},[2355],{"type":48,"value":816},{"type":43,"tag":457,"props":2357,"children":2358},{"style":553},[2359],{"type":48,"value":866},{"type":43,"tag":457,"props":2361,"children":2362},{"style":547},[2363],{"type":48,"value":816},{"type":43,"tag":457,"props":2365,"children":2366},{"style":819},[2367],{"type":48,"value":301},{"type":43,"tag":457,"props":2369,"children":2370},{"style":553},[2371],{"type":48,"value":2372},"(Date",{"type":43,"tag":457,"props":2374,"children":2375},{"style":547},[2376],{"type":48,"value":816},{"type":43,"tag":457,"props":2378,"children":2379},{"style":819},[2380],{"type":48,"value":2381},"now",{"type":43,"tag":457,"props":2383,"children":2384},{"style":553},[2385],{"type":48,"value":2386},"() ",{"type":43,"tag":457,"props":2388,"children":2389},{"style":547},[2390],{"type":48,"value":2391},"+",{"type":43,"tag":457,"props":2393,"children":2395},{"style":2394},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2396],{"type":48,"value":2397}," 60_000",{"type":43,"tag":457,"props":2399,"children":2400},{"style":553},[2401],{"type":48,"value":765},{"type":43,"tag":457,"props":2403,"children":2404},{"style":547},[2405],{"type":48,"value":587},{"type":43,"tag":457,"props":2407,"children":2408},{"class":459,"line":478},[2409],{"type":43,"tag":457,"props":2410,"children":2411},{"emptyLinePlaceholder":593},[2412],{"type":48,"value":596},{"type":43,"tag":457,"props":2414,"children":2415},{"class":459,"line":487},[2416],{"type":43,"tag":457,"props":2417,"children":2418},{"style":1698},[2419],{"type":48,"value":2420},"\u002F\u002F Handler\n",{"type":43,"tag":457,"props":2422,"children":2423},{"class":459,"line":496},[2424,2429,2434,2439,2444,2449],{"type":43,"tag":457,"props":2425,"children":2426},{"style":553},[2427],{"type":48,"value":2428},"async ",{"type":43,"tag":457,"props":2430,"children":2431},{"style":819},[2432],{"type":48,"value":2433},"alarm",{"type":43,"tag":457,"props":2435,"children":2436},{"style":553},[2437],{"type":48,"value":2438},"(): ",{"type":43,"tag":457,"props":2440,"children":2441},{"style":613},[2442],{"type":48,"value":2443},"Promise",{"type":43,"tag":457,"props":2445,"children":2446},{"style":547},[2447],{"type":48,"value":2448},"\u003Cvoid>",{"type":43,"tag":457,"props":2450,"children":2451},{"style":547},[2452],{"type":48,"value":621},{"type":43,"tag":457,"props":2454,"children":2455},{"class":459,"line":505},[2456],{"type":43,"tag":457,"props":2457,"children":2458},{"style":1698},[2459],{"type":48,"value":2460},"  \u002F\u002F Process scheduled work\n",{"type":43,"tag":457,"props":2462,"children":2463},{"class":459,"line":514},[2464],{"type":43,"tag":457,"props":2465,"children":2466},{"style":1698},[2467],{"type":48,"value":2468},"  \u002F\u002F Optionally reschedule: await this.ctx.storage.setAlarm(...)\n",{"type":43,"tag":457,"props":2470,"children":2471},{"class":459,"line":716},[2472],{"type":43,"tag":457,"props":2473,"children":2474},{"style":547},[2475],{"type":48,"value":520},{"type":43,"tag":457,"props":2477,"children":2478},{"class":459,"line":772},[2479],{"type":43,"tag":457,"props":2480,"children":2481},{"emptyLinePlaceholder":593},[2482],{"type":48,"value":596},{"type":43,"tag":457,"props":2484,"children":2485},{"class":459,"line":805},[2486],{"type":43,"tag":457,"props":2487,"children":2488},{"style":1698},[2489],{"type":48,"value":2490},"\u002F\u002F Cancel\n",{"type":43,"tag":457,"props":2492,"children":2493},{"class":459,"line":847},[2494,2498,2502,2506,2510,2514,2518,2523,2527],{"type":43,"tag":457,"props":2495,"children":2496},{"style":541},[2497],{"type":48,"value":1657},{"type":43,"tag":457,"props":2499,"children":2500},{"style":547},[2501],{"type":48,"value":1063},{"type":43,"tag":457,"props":2503,"children":2504},{"style":553},[2505],{"type":48,"value":733},{"type":43,"tag":457,"props":2507,"children":2508},{"style":547},[2509],{"type":48,"value":816},{"type":43,"tag":457,"props":2511,"children":2512},{"style":553},[2513],{"type":48,"value":866},{"type":43,"tag":457,"props":2515,"children":2516},{"style":547},[2517],{"type":48,"value":816},{"type":43,"tag":457,"props":2519,"children":2520},{"style":819},[2521],{"type":48,"value":2522},"deleteAlarm",{"type":43,"tag":457,"props":2524,"children":2525},{"style":553},[2526],{"type":48,"value":1192},{"type":43,"tag":457,"props":2528,"children":2529},{"style":547},[2530],{"type":48,"value":587},{"type":43,"tag":57,"props":2532,"children":2534},{"id":2533},"testing-quick-start",[2535],{"type":48,"value":2536},"Testing Quick Start",{"type":43,"tag":446,"props":2538,"children":2540},{"className":529,"code":2539,"language":531,"meta":451,"style":451},"import { env } from \"cloudflare:test\";\nimport { describe, it, expect } from \"vitest\";\n\ndescribe(\"MyDO\", () => {\n  it(\"should work\", async () => {\n    const stub = env.MY_DO.getByName(\"test\");\n    const result = await stub.addItem(\"test\");\n    expect(result).toBe(1);\n  });\n});\n",[2541],{"type":43,"tag":216,"props":2542,"children":2543},{"__ignoreMap":451},[2544,2584,2643,2650,2691,2737,2797,2852,2899,2915],{"type":43,"tag":457,"props":2545,"children":2546},{"class":459,"line":460},[2547,2551,2555,2559,2563,2567,2571,2576,2580],{"type":43,"tag":457,"props":2548,"children":2549},{"style":541},[2550],{"type":48,"value":544},{"type":43,"tag":457,"props":2552,"children":2553},{"style":547},[2554],{"type":48,"value":550},{"type":43,"tag":457,"props":2556,"children":2557},{"style":553},[2558],{"type":48,"value":752},{"type":43,"tag":457,"props":2560,"children":2561},{"style":547},[2562],{"type":48,"value":561},{"type":43,"tag":457,"props":2564,"children":2565},{"style":541},[2566],{"type":48,"value":566},{"type":43,"tag":457,"props":2568,"children":2569},{"style":547},[2570],{"type":48,"value":571},{"type":43,"tag":457,"props":2572,"children":2573},{"style":574},[2574],{"type":48,"value":2575},"cloudflare:test",{"type":43,"tag":457,"props":2577,"children":2578},{"style":547},[2579],{"type":48,"value":582},{"type":43,"tag":457,"props":2581,"children":2582},{"style":547},[2583],{"type":48,"value":587},{"type":43,"tag":457,"props":2585,"children":2586},{"class":459,"line":469},[2587,2591,2595,2600,2604,2609,2613,2618,2622,2626,2630,2635,2639],{"type":43,"tag":457,"props":2588,"children":2589},{"style":541},[2590],{"type":48,"value":544},{"type":43,"tag":457,"props":2592,"children":2593},{"style":547},[2594],{"type":48,"value":550},{"type":43,"tag":457,"props":2596,"children":2597},{"style":553},[2598],{"type":48,"value":2599}," describe",{"type":43,"tag":457,"props":2601,"children":2602},{"style":547},[2603],{"type":48,"value":747},{"type":43,"tag":457,"props":2605,"children":2606},{"style":553},[2607],{"type":48,"value":2608}," it",{"type":43,"tag":457,"props":2610,"children":2611},{"style":547},[2612],{"type":48,"value":747},{"type":43,"tag":457,"props":2614,"children":2615},{"style":553},[2616],{"type":48,"value":2617}," expect",{"type":43,"tag":457,"props":2619,"children":2620},{"style":547},[2621],{"type":48,"value":561},{"type":43,"tag":457,"props":2623,"children":2624},{"style":541},[2625],{"type":48,"value":566},{"type":43,"tag":457,"props":2627,"children":2628},{"style":547},[2629],{"type":48,"value":571},{"type":43,"tag":457,"props":2631,"children":2632},{"style":574},[2633],{"type":48,"value":2634},"vitest",{"type":43,"tag":457,"props":2636,"children":2637},{"style":547},[2638],{"type":48,"value":582},{"type":43,"tag":457,"props":2640,"children":2641},{"style":547},[2642],{"type":48,"value":587},{"type":43,"tag":457,"props":2644,"children":2645},{"class":459,"line":478},[2646],{"type":43,"tag":457,"props":2647,"children":2648},{"emptyLinePlaceholder":593},[2649],{"type":48,"value":596},{"type":43,"tag":457,"props":2651,"children":2652},{"class":459,"line":487},[2653,2658,2662,2666,2671,2675,2679,2683,2687],{"type":43,"tag":457,"props":2654,"children":2655},{"style":819},[2656],{"type":48,"value":2657},"describe",{"type":43,"tag":457,"props":2659,"children":2660},{"style":553},[2661],{"type":48,"value":727},{"type":43,"tag":457,"props":2663,"children":2664},{"style":547},[2665],{"type":48,"value":582},{"type":43,"tag":457,"props":2667,"children":2668},{"style":574},[2669],{"type":48,"value":2670},"MyDO",{"type":43,"tag":457,"props":2672,"children":2673},{"style":547},[2674],{"type":48,"value":582},{"type":43,"tag":457,"props":2676,"children":2677},{"style":547},[2678],{"type":48,"value":747},{"type":43,"tag":457,"props":2680,"children":2681},{"style":547},[2682],{"type":48,"value":835},{"type":43,"tag":457,"props":2684,"children":2685},{"style":607},[2686],{"type":48,"value":840},{"type":43,"tag":457,"props":2688,"children":2689},{"style":547},[2690],{"type":48,"value":621},{"type":43,"tag":457,"props":2692,"children":2693},{"class":459,"line":496},[2694,2699,2703,2707,2712,2716,2720,2725,2729,2733],{"type":43,"tag":457,"props":2695,"children":2696},{"style":819},[2697],{"type":48,"value":2698},"  it",{"type":43,"tag":457,"props":2700,"children":2701},{"style":627},[2702],{"type":48,"value":727},{"type":43,"tag":457,"props":2704,"children":2705},{"style":547},[2706],{"type":48,"value":582},{"type":43,"tag":457,"props":2708,"children":2709},{"style":574},[2710],{"type":48,"value":2711},"should work",{"type":43,"tag":457,"props":2713,"children":2714},{"style":547},[2715],{"type":48,"value":582},{"type":43,"tag":457,"props":2717,"children":2718},{"style":547},[2719],{"type":48,"value":747},{"type":43,"tag":457,"props":2721,"children":2722},{"style":607},[2723],{"type":48,"value":2724}," async",{"type":43,"tag":457,"props":2726,"children":2727},{"style":547},[2728],{"type":48,"value":835},{"type":43,"tag":457,"props":2730,"children":2731},{"style":607},[2732],{"type":48,"value":840},{"type":43,"tag":457,"props":2734,"children":2735},{"style":547},[2736],{"type":48,"value":621},{"type":43,"tag":457,"props":2738,"children":2739},{"class":459,"line":505},[2740,2744,2748,2752,2756,2760,2764,2768,2772,2776,2780,2785,2789,2793],{"type":43,"tag":457,"props":2741,"children":2742},{"style":607},[2743],{"type":48,"value":1048},{"type":43,"tag":457,"props":2745,"children":2746},{"style":553},[2747],{"type":48,"value":1331},{"type":43,"tag":457,"props":2749,"children":2750},{"style":547},[2751],{"type":48,"value":1058},{"type":43,"tag":457,"props":2753,"children":2754},{"style":553},[2755],{"type":48,"value":752},{"type":43,"tag":457,"props":2757,"children":2758},{"style":547},[2759],{"type":48,"value":816},{"type":43,"tag":457,"props":2761,"children":2762},{"style":553},[2763],{"type":48,"value":1348},{"type":43,"tag":457,"props":2765,"children":2766},{"style":547},[2767],{"type":48,"value":816},{"type":43,"tag":457,"props":2769,"children":2770},{"style":819},[2771],{"type":48,"value":294},{"type":43,"tag":457,"props":2773,"children":2774},{"style":627},[2775],{"type":48,"value":727},{"type":43,"tag":457,"props":2777,"children":2778},{"style":547},[2779],{"type":48,"value":582},{"type":43,"tag":457,"props":2781,"children":2782},{"style":574},[2783],{"type":48,"value":2784},"test",{"type":43,"tag":457,"props":2786,"children":2787},{"style":547},[2788],{"type":48,"value":582},{"type":43,"tag":457,"props":2790,"children":2791},{"style":627},[2792],{"type":48,"value":765},{"type":43,"tag":457,"props":2794,"children":2795},{"style":547},[2796],{"type":48,"value":587},{"type":43,"tag":457,"props":2798,"children":2799},{"class":459,"line":514},[2800,2804,2808,2812,2816,2820,2824,2828,2832,2836,2840,2844,2848],{"type":43,"tag":457,"props":2801,"children":2802},{"style":607},[2803],{"type":48,"value":1048},{"type":43,"tag":457,"props":2805,"children":2806},{"style":553},[2807],{"type":48,"value":1053},{"type":43,"tag":457,"props":2809,"children":2810},{"style":547},[2811],{"type":48,"value":1058},{"type":43,"tag":457,"props":2813,"children":2814},{"style":541},[2815],{"type":48,"value":1402},{"type":43,"tag":457,"props":2817,"children":2818},{"style":553},[2819],{"type":48,"value":1331},{"type":43,"tag":457,"props":2821,"children":2822},{"style":547},[2823],{"type":48,"value":816},{"type":43,"tag":457,"props":2825,"children":2826},{"style":819},[2827],{"type":48,"value":1415},{"type":43,"tag":457,"props":2829,"children":2830},{"style":627},[2831],{"type":48,"value":727},{"type":43,"tag":457,"props":2833,"children":2834},{"style":547},[2835],{"type":48,"value":582},{"type":43,"tag":457,"props":2837,"children":2838},{"style":574},[2839],{"type":48,"value":2784},{"type":43,"tag":457,"props":2841,"children":2842},{"style":547},[2843],{"type":48,"value":582},{"type":43,"tag":457,"props":2845,"children":2846},{"style":627},[2847],{"type":48,"value":765},{"type":43,"tag":457,"props":2849,"children":2850},{"style":547},[2851],{"type":48,"value":587},{"type":43,"tag":457,"props":2853,"children":2854},{"class":459,"line":716},[2855,2860,2864,2869,2873,2877,2882,2886,2891,2895],{"type":43,"tag":457,"props":2856,"children":2857},{"style":819},[2858],{"type":48,"value":2859},"    expect",{"type":43,"tag":457,"props":2861,"children":2862},{"style":627},[2863],{"type":48,"value":727},{"type":43,"tag":457,"props":2865,"children":2866},{"style":553},[2867],{"type":48,"value":2868},"result",{"type":43,"tag":457,"props":2870,"children":2871},{"style":627},[2872],{"type":48,"value":765},{"type":43,"tag":457,"props":2874,"children":2875},{"style":547},[2876],{"type":48,"value":816},{"type":43,"tag":457,"props":2878,"children":2879},{"style":819},[2880],{"type":48,"value":2881},"toBe",{"type":43,"tag":457,"props":2883,"children":2884},{"style":627},[2885],{"type":48,"value":727},{"type":43,"tag":457,"props":2887,"children":2888},{"style":2394},[2889],{"type":48,"value":2890},"1",{"type":43,"tag":457,"props":2892,"children":2893},{"style":627},[2894],{"type":48,"value":765},{"type":43,"tag":457,"props":2896,"children":2897},{"style":547},[2898],{"type":48,"value":587},{"type":43,"tag":457,"props":2900,"children":2901},{"class":459,"line":772},[2902,2907,2911],{"type":43,"tag":457,"props":2903,"children":2904},{"style":547},[2905],{"type":48,"value":2906},"  }",{"type":43,"tag":457,"props":2908,"children":2909},{"style":627},[2910],{"type":48,"value":765},{"type":43,"tag":457,"props":2912,"children":2913},{"style":547},[2914],{"type":48,"value":587},{"type":43,"tag":457,"props":2916,"children":2917},{"class":459,"line":805},[2918,2923,2927],{"type":43,"tag":457,"props":2919,"children":2920},{"style":547},[2921],{"type":48,"value":2922},"}",{"type":43,"tag":457,"props":2924,"children":2925},{"style":553},[2926],{"type":48,"value":765},{"type":43,"tag":457,"props":2928,"children":2929},{"style":547},[2930],{"type":48,"value":587},{"type":43,"tag":2932,"props":2933,"children":2934},"style",{},[2935],{"type":48,"value":2936},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2938,"total":1123},[2939,2954,2968,2983,2996,3010,3024,3038,3055,3072,3085,3100],{"slug":2940,"name":2940,"fn":2941,"description":2942,"org":2943,"tags":2944,"stars":2951,"repoUrl":2952,"updatedAt":2953},"code-review","review code changes for quality and risk","Review code changes for correctness, clarity, and risk. Use when the user asks for a review, a second opinion on a diff, or feedback on code they wrote.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2945,2946,2948],{"name":9,"slug":8,"type":15},{"name":2947,"slug":2940,"type":15},"Code Review",{"name":2949,"slug":2950,"type":15},"Engineering","engineering",5284,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fagents","2026-06-08T08:19:41.621858",{"slug":2955,"name":2955,"fn":2956,"description":2957,"org":2958,"tags":2959,"stars":2951,"repoUrl":2952,"updatedAt":2967},"debug-plan","create systematic debugging plans","Create a systematic debugging plan for a bug report. Use when the user asks how to investigate a failure, regression, or unexpected behavior.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2960,2963,2966],{"name":2961,"slug":2962,"type":15},"Code Analysis","code-analysis",{"name":2964,"slug":2965,"type":15},"Debugging","debugging",{"name":2949,"slug":2950,"type":15},"2026-05-30T06:16:58.837407",{"slug":2969,"name":2969,"fn":2970,"description":2971,"org":2972,"tags":2973,"stars":2951,"repoUrl":2952,"updatedAt":2982},"escalation","escalate customer issues to human agents","Decide when and how to escalate a customer conversation to a human agent. Use when a request is high-risk, the customer is frustrated, or the issue is outside what you can resolve.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2974,2977,2980],{"name":2975,"slug":2976,"type":15},"Communications","communications",{"name":2978,"slug":2979,"type":15},"Customer Support","customer-support",{"name":2981,"slug":2969,"type":15},"Escalation","2026-06-08T08:19:43.130686",{"slug":2984,"name":2984,"fn":2985,"description":2986,"org":2987,"tags":2988,"stars":2951,"repoUrl":2952,"updatedAt":2995},"pirate-voice","rewrite text in pirate voice","Rewrite or answer in a playful pirate voice. Use when the user asks for pirate tone, nautical phrasing, or says to talk like a pirate.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2989,2992],{"name":2990,"slug":2991,"type":15},"Creative","creative",{"name":2993,"slug":2994,"type":15},"Writing","writing","2026-05-30T06:17:00.080367",{"slug":2997,"name":2997,"fn":2998,"description":2999,"org":3000,"tags":3001,"stars":2951,"repoUrl":2952,"updatedAt":3009},"release-notes","draft product release notes","Draft short release notes from a list of changes. Use when the user asks for changelogs, release notes, or a concise product update.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3002,3005,3008],{"name":3003,"slug":3004,"type":15},"Content Creation","content-creation",{"name":3006,"slug":3007,"type":15},"Documentation","documentation",{"name":2993,"slug":2994,"type":15},"2026-05-30T06:17:01.278643",{"slug":3011,"name":3011,"fn":3012,"description":3013,"org":3014,"tags":3015,"stars":2951,"repoUrl":2952,"updatedAt":3023},"test-plan","produce focused test plans","Produce a focused test plan for a change. Use when the user asks how to test a feature, what cases to cover, or for a QA checklist before shipping.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3016,3017,3020],{"name":2949,"slug":2950,"type":15},{"name":3018,"slug":3019,"type":15},"QA","qa",{"name":3021,"slug":3022,"type":15},"Testing","testing","2026-05-30T06:17:02.479863",{"slug":3025,"name":3025,"fn":3026,"description":3027,"org":3028,"tags":3029,"stars":2951,"repoUrl":2952,"updatedAt":3037},"workspace-digest","summarize files in the shared workspace","Summarize the files saved in this assistant's shared workspace. Use when the user asks what is in their workspace, for a file inventory, or a digest of saved work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3030,3031,3034],{"name":3006,"slug":3007,"type":15},{"name":3032,"slug":3033,"type":15},"Knowledge Management","knowledge-management",{"name":3035,"slug":3036,"type":15},"Summarization","summarization","2026-06-07T07:51:27.265303",{"slug":3039,"name":3039,"fn":3040,"description":3041,"org":3042,"tags":3043,"stars":3052,"repoUrl":3053,"updatedAt":3054},"cloudflare-bundler-apps","author Cloudflare Worker Bundler applications","Author Cloudflare Worker Bundler-compatible apps that build and preview correctly inside a space. Use this skill whenever you scaffold, modify, or deploy a project that will be built with `@cloudflare\u002Fworker-bundler` (i.e. anything served from `\u002Fspace\u002F:name\u002Fpreview\u002F:branch\u002F`). Covers wrangler config, project layout, static asset rules, server entry conventions, npm dependency limits, and the most common cause of blank previews (JSX in browser scripts).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3044,3045,3046,3049],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3047,"slug":3048,"type":15},"Deployment","deployment",{"name":3050,"slug":3051,"type":15},"Web Development","web-development",5145,"https:\u002F\u002Fgithub.com\u002Fcloudflare\u002Fvibesdk","2026-06-16T09:45:57.551207",{"slug":3056,"name":3056,"fn":3057,"description":3058,"org":3059,"tags":3060,"stars":3052,"repoUrl":3053,"updatedAt":3071},"frontend-design","create production-grade frontend interfaces","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3061,3064,3067,3070],{"name":3062,"slug":3063,"type":15},"Design","design",{"name":3065,"slug":3066,"type":15},"Frontend","frontend",{"name":3068,"slug":3069,"type":15},"HTML","html",{"name":3050,"slug":3051,"type":15},"2026-06-16T09:46:01.852741",{"slug":3073,"name":3073,"fn":3074,"description":3075,"org":3076,"tags":3077,"stars":3052,"repoUrl":3053,"updatedAt":3084},"frontend-design-landing-page","build marketing landing pages","Marketing landing page and conversion-focused product page reference. Use this skill when building hero sections, feature grids, pricing pages, testimonials, CTAs, footers, navigation bars, or any public-facing marketing surface. Covers a warm, professional, developer-friendly design language (cream backgrounds, generous whitespace, pill CTAs, corner-bracket card decorations) and a complete token set, animation system, and copy-paste component snippets. NOT for product\u002Fdashboard UIs — use frontend-design-saas for those.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3078,3079,3080,3083],{"name":3065,"slug":3066,"type":15},{"name":3068,"slug":3069,"type":15},{"name":3081,"slug":3082,"type":15},"Marketing","marketing",{"name":3050,"slug":3051,"type":15},"2026-06-16T09:46:00.515859",{"slug":3086,"name":3086,"fn":3087,"description":3088,"org":3089,"tags":3090,"stars":3052,"repoUrl":3053,"updatedAt":3099},"frontend-design-saas","build SaaS dashboard and product UIs","S-tier SaaS dashboard and product UI reference. Use this skill when building application shells, data tables, settings panels, billing pages, dashboards, auth flows, admin tools, or any internal\u002Fcustomer-facing SaaS product UI. Inspired by Stripe, Linear, Vercel, Airbnb, Notion. Covers neutral-led design tokens, sidebar+content shells, dense data UIs, form-heavy configuration pages, command palettes, empty states, and the accessibility (WCAG AA+) bar these products clear.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3091,3092,3093,3096],{"name":3062,"slug":3063,"type":15},{"name":3065,"slug":3066,"type":15},{"name":3094,"slug":3095,"type":15},"SaaS","saas",{"name":3097,"slug":3098,"type":15},"UI Components","ui-components","2026-06-16T09:45:58.956063",{"slug":3101,"name":3101,"fn":3102,"description":3103,"org":3104,"tags":3105,"stars":23,"repoUrl":24,"updatedAt":3114},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, chat applications, voice agents, or browser automation. Covers Agent class, state management, callable RPC, Workflows, durable execution, queues, retries, observability, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3106,3108,3109,3110,3113],{"name":3107,"slug":29,"type":15},"Agents",{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3111,"slug":3112,"type":15},"MCP","mcp",{"name":17,"slug":18,"type":15},"2026-04-06T18:07:36.660888",{"items":3116,"total":847},[3117,3125,3138,3151,3177,3196,3203],{"slug":3101,"name":3101,"fn":3102,"description":3103,"org":3118,"tags":3119,"stars":23,"repoUrl":24,"updatedAt":3114},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3120,3121,3122,3123,3124],{"name":3107,"slug":29,"type":15},{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3111,"slug":3112,"type":15},{"name":17,"slug":18,"type":15},{"slug":8,"name":8,"fn":3126,"description":3127,"org":3128,"tags":3129,"stars":23,"repoUrl":24,"updatedAt":3137},"build on the full Cloudflare platform","Comprehensive Cloudflare platform skill covering Workers, Pages, storage (KV, D1, R2), AI (Workers AI, Vectorize, Agents SDK), feature flags (Flagship), networking (Tunnel, Spectrum), security (WAF, DDoS), and infrastructure-as-code (Terraform, Pulumi). Use for any Cloudflare development task. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3130,3131,3132,3135],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3133,"slug":3134,"type":15},"Serverless","serverless",{"name":3136,"slug":866,"type":15},"Storage","2026-04-06T18:07:35.399081",{"slug":3139,"name":3139,"fn":3140,"description":3141,"org":3142,"tags":3143,"stars":23,"repoUrl":24,"updatedAt":3150},"cloudflare-email-service","manage transactional emails with Cloudflare","Send and receive transactional emails with Cloudflare Email Service (Email Sending + Email Routing). Use when building email sending (Workers binding or REST API), email routing, Agents SDK email handling, or integrating email into any app — Workers, Node.js, Python, Go, etc. Also use for email deliverability, SPF\u002FDKIM\u002FDMARC, wrangler email setup, MCP email tools, or when a coding agent needs to send emails. Even for simple requests like \"add email to my Worker\" — this skill has critical config details.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3144,3145,3146,3149],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3147,"slug":3148,"type":15},"Email","email",{"name":3133,"slug":3134,"type":15},"2026-04-16T05:02:38.301955",{"slug":3152,"name":3152,"fn":3153,"description":3154,"org":3155,"tags":3156,"stars":23,"repoUrl":24,"updatedAt":3176},"cloudflare-one","configure and manage Cloudflare One Zero Trust","Guides Cloudflare One Zero Trust and SASE work across Access, Gateway, WARP, Tunnel, Cloudflare WAN, DLP, CASB, device posture, and identity. Use when designing, configuring, troubleshooting, or reviewing Cloudflare One deployments. Retrieval-first: use current Cloudflare docs\u002FAPI schemas instead of embedded product docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3157,3160,3161,3164,3167,3170,3173],{"name":3158,"slug":3159,"type":15},"Access Control","access-control",{"name":9,"slug":8,"type":15},{"name":3162,"slug":3163,"type":15},"Infrastructure","infrastructure",{"name":3165,"slug":3166,"type":15},"Networking","networking",{"name":3168,"slug":3169,"type":15},"SASE","sase",{"name":3171,"slug":3172,"type":15},"Security","security",{"name":3174,"slug":3175,"type":15},"Zero Trust","zero-trust","2026-06-15T09:51:34.015251",{"slug":3178,"name":3178,"fn":3179,"description":3180,"org":3181,"tags":3182,"stars":23,"repoUrl":24,"updatedAt":3195},"cloudflare-one-migrations","plan migrations to Cloudflare One","Plans migrations from Zscaler ZIA\u002FZPA, Palo Alto, legacy VPN, SWG, or SASE stacks to Cloudflare One. Use for migration assessments, policy mapping, rollout plans, and parity\u002Fgap analysis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3183,3184,3187,3188,3191,3192],{"name":9,"slug":8,"type":15},{"name":3185,"slug":3186,"type":15},"Migration","migration",{"name":3165,"slug":3166,"type":15},{"name":3189,"slug":3190,"type":15},"Risk Assessment","risk-assessment",{"name":3171,"slug":3172,"type":15},{"name":3193,"slug":3194,"type":15},"Strategy","strategy","2026-06-15T09:51:35.348691",{"slug":4,"name":4,"fn":5,"description":6,"org":3197,"tags":3198,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3199,3200,3201,3202],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":21,"slug":22,"type":15},{"name":17,"slug":18,"type":15},{"slug":3204,"name":3204,"fn":3205,"description":3206,"org":3207,"tags":3208,"stars":23,"repoUrl":24,"updatedAt":3218},"sandbox-sdk","build sandboxed code execution apps on Cloudflare","Build sandboxed applications for secure code execution. Load when building AI code execution, code interpreters, CI\u002FCD systems, interactive dev environments, or executing untrusted code. Covers Sandbox SDK lifecycle, commands, files, code interpreter, and preview URLs. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3209,3210,3211,3214,3217],{"name":9,"slug":8,"type":15},{"name":13,"slug":14,"type":15},{"name":3212,"slug":3213,"type":15},"Code Execution","code-execution",{"name":3215,"slug":3216,"type":15},"Sandboxing","sandboxing",{"name":3133,"slug":3134,"type":15},"2026-04-06T18:07:37.89439"]