Expand description
wrangler.toml generation per Worker (v0.8 §4.4 / §4.5).
Each context becomes a Cloudflare Worker with its own wrangler config. Service Bindings are declared for every consumed context. Durable Object bindings + migrations are declared for every agent.
Constants§
- KV_
NAMESPACE_ ID_ PLACEHOLDER - Deploy-time sentinel in generated Worker configuration. The driver replaces this with the persistent Cloudflare KV namespace id immediately before a remote Wrangler command runs.
Functions§
- materialise_
kv_ namespace_ id - Materialise the deploy-time KV namespace id placeholder in a generated
wrangler.toml’s text, structurally. Parsestextand, if (and only if) the first[[kv_namespaces]]entry’sidis currently exactlyKV_NAMESPACE_ID_PLACEHOLDER, replaces it withid. - wrangler_
needs_ kv_ materialisation - Whether a generated
wrangler.toml’s KV namespace id is still the deploy-time placeholder — the same conditionmaterialise_kv_namespace_iditself checks internally before writing, exposed separately so a caller can decide whether materialising is needed at all before doing the (possibly fallible) work of finding the real id to substitute — e.g.bynk dev --remoteskipping a lock-file lookup entirely for a project that either has no KV binding or is already materialised.