// Herma Cloud Worker: 24/7 context-shimming AI middleware on Cloudflare Workers + D1 (`ta-amps-herma`) // with direct Service Binding to `tessera` Cloud (`env.TESSERA`) and optional `STORAGE_MODE=origin` fallback. // Deploy: npx wrangler@4.149.0 deploy --config deploy/cloudflare/wrangler.jsonc // Secret: npx wrangler@4.149.0 secret put BOOTSTRAP_SECRET --config deploy/cloudflare/wrangler.jsonc { "name": "herma", "main": "entry.js", "compatibility_date": "2026-10-01", "workers_dev": true, "durable_objects": { "bindings": [ { "name": "WORK_CONVERSATIONS", "class_name": "WorkConversation" }, { "name": "WORK_REASONING_BUDGET", "class_name": "WorkReasoningBudget" } ] }, "migrations": [ { "tag": "work-conversation-v1", "new_sqlite_classes": ["WorkConversation", "WorkReasoningBudget"] } ], "d1_databases": [ { "binding": "HERMA_DB", "database_name": "ta-amps-herma", "database_id": "82f9df26-3390-4d58-80a1-82ad0fdcfc7d" } ], "services": [ { "binding": "TESSERA", "service": "tessera" } ], // "routes": [{ "pattern": "herma.", "custom_domain": true }], "vars": { "HERMA_CONVERSATION_ENABLED": "true", "HERMA_CONVERSATION_DISABLED_PROVIDERS": "[\"anthropic\",\"openrouter\"]", "HERMA_META_BUDGET_USD": "5", "HERMA_OLLAMA_CALLS_PER_DAY": "30", "STORAGE_MODE": "cloud", "PUBLIC_URL": "https://herma.ta-amps.workers.dev", "TESSERA_URL": "https://tessera.ta-amps.workers.dev", "ORIGIN": "https://herma-api.fly.dev" }, "observability": { "enabled": true, "traces": { "enabled": true } } }