The page talks to a Neighbor over the agent WebSocket: it sends chat requests, shows the code the model runs and what came of it, and draws the yard from the agent's state. The yard is the Neighbor's state, so the page hears each move and a yard survives eviction: the mower picks up where the saved yard left off. Moves go out at most every 200ms, so a long run of pushes is not a write per cell. Only the server may change that state; Agent state otherwise accepts updates from any connected client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
21 lines
732 B
JSON
21 lines
732 B
JSON
{
|
|
"$schema": "node_modules/wrangler/config-schema.json",
|
|
"name": "good-fences3",
|
|
"main": "./src/worker.ts",
|
|
"compatibility_date": "2026-10-01",
|
|
"compatibility_flags": ["nodejs_compat"],
|
|
// the chat page; other paths fall through to the Worker
|
|
"assets": { "directory": "./public" },
|
|
"ai": { "binding": "AI" },
|
|
// Dynamic Workers: deploying this binding takes the Workers Paid plan
|
|
"worker_loaders": [{ "binding": "LOADER" }],
|
|
"durable_objects": {
|
|
"bindings": [{ "name": "Neighbor", "class_name": "Neighbor" }]
|
|
},
|
|
"exports": {
|
|
"Neighbor": { "type": "durable-object", "storage": "sqlite" },
|
|
// codemode's runtime, a facet of the agent's DO
|
|
"CodemodeRuntime": { "type": "durable-object", "storage": "sqlite" }
|
|
}
|
|
}
|