Files
zpan/wrangler.toml
T
saltbo d7ba55b9da feat(auth): support external agent resources
Replace bundled agent profiles, API keys, plugin, and skill surfaces with dynamic OAuth client registration, delegated DPoP tokens, discoverable scopes, and Arazzo-backed direct upload workflows.

Refs realmroot/realmroot#115
2026-07-30 10:41:39 -04:00

109 lines
2.7 KiB
TOML

name = "zpan"
main = "./workers/bootstrap.ts"
compatibility_date = "2026-04-12"
compatibility_flags = ["nodejs_compat", "global_fetch_strictly_public"]
[assets]
binding = "ASSETS"
not_found_handling = "single-page-application"
run_worker_first = ["/api", "/api/*", "/.well-known/*", "/dav", "/dav/*", "/ih/*", "/r/*", "/s/*"]
[[d1_databases]]
binding = "DB"
database_name = "zpan-db"
database_id = "5bd64957-fa49-4da0-8b7b-6e0ad84037e7"
migrations_dir = "./migrations"
[[kv_namespaces]]
binding = "CACHE_KV"
id = "2721f9d7b47d433d8a0e02171e276f57"
[[ratelimits]]
name = "WEBDAV_RATE_LIMITER"
namespace_id = "2801"
[ratelimits.simple]
limit = 3600
period = 60
[vars]
ZPAN_CACHE_MODE = "distributed"
[[send_email]]
name = "EMAIL"
[[queues.producers]]
binding = "ARCHIVE_QUEUE"
queue = "zpan-archive-jobs"
[[queues.consumers]]
queue = "zpan-archive-jobs"
max_batch_size = 1
max_batch_timeout = 1
max_retries = 3
# Self-hosted avatar storage. When present, avatars upload straight to R2 (served from
# /api/avatar-blobs, or from PUBLIC_IMAGES_URL if an R2 custom domain is configured)
# instead of the ZPan Cloud avatar service.
[[r2_buckets]]
binding = "PUBLIC_IMAGES"
bucket_name = "zpan-public-images"
[observability]
enabled = true
[observability.traces]
enabled = true
head_sampling_rate = 0.1
[triggers]
crons = ["*/10 * * * *", "10 * * * *", "0 */6 * * *", "0 */12 * * *", "0 0 1 * *", "0 4 * * *"]
# ----------------------------------------------------------------------------
# Staging environment — used by non-production branch builds.
# CLOUDFLARE_ENV=staging is set automatically in the build script.
# Workers Builds creates preview versions on the same zpan Worker
# but with staging D1 binding.
# ----------------------------------------------------------------------------
[env.staging]
[env.staging.vars]
BETTER_AUTH_URL = "https://zpan-staging.saltbo.workers.dev"
ZPAN_CLOUD_URL = "https://zpan-cloud-staging.saltbo.workers.dev"
ZPAN_CACHE_MODE = "distributed"
[[env.staging.d1_databases]]
binding = "DB"
database_name = "zpan-db-staging"
database_id = "a9197d7a-6524-42f0-b646-e714dcb30b3b"
migrations_dir = "./migrations"
[[env.staging.kv_namespaces]]
binding = "CACHE_KV"
id = "7d8625bacbc54e23a46ca4464a9f64a0"
[[env.staging.ratelimits]]
name = "WEBDAV_RATE_LIMITER"
namespace_id = "2802"
[env.staging.ratelimits.simple]
limit = 3600
period = 60
[[env.staging.r2_buckets]]
binding = "PUBLIC_IMAGES"
bucket_name = "zpan-public-images-staging"
[[env.staging.send_email]]
name = "EMAIL"
[[env.staging.queues.producers]]
binding = "ARCHIVE_QUEUE"
queue = "zpan-archive-jobs-staging"
[[env.staging.queues.consumers]]
queue = "zpan-archive-jobs-staging"
max_batch_size = 1
max_batch_timeout = 1
max_retries = 3