Dispatch proxy + encrypted secret storage
env.secrets
Creator, Pro
Call an external API with a key the browser never sees.
Usage: Your code attaches the secret to a request with env.fetch and env.secrets.bearer/header/query; the plaintext value stays on the server.
const res = await env.fetch("https://api.example.com/v1/messages", {
method: "POST",
auth: env.secrets.bearer("PROVIDER_API_KEY"),
});
return await res.json();
Pulse State operation coordination
env.state
Free, Creator, Pro
Make a charge or a write happen exactly once, even on a retry.
Usage: Declare named state resources in the descriptor, derive a stable key from the request, then runOnce(). Vibecodr persists the coordination record in platform-owned durable storage, so cold starts do not erase it and idle retention mostly costs tiny stored metadata. retentionTtlSeconds controls duplicate-memory retention and is capped by plan.
const key = await env.state.payments.keyFromRequest(env.request);
return env.state.payments.runOnce(key, async () => {
await chargeCustomer();
return { accepted: true };
});
Provider-scoped account capability via dispatch
env.connections
Free (1), Creator (3), Pro (unlimited)
Act as a connected account — like GitHub — without storing its token in your code.
Usage: Connect the account once in setup, then call it from the server side.
const github = env.connections.use("github");
const me = await github.fetch("/user", {
headers: { "User-Agent": "vibecodr-pulse" },
});
return await me.json();
Policy outbound fetch
env.fetch
Free, Creator, Pro
Make outbound calls through the platform's egress policy, not from the page.
Usage: Use env.fetch for public outbound requests that should follow the server-side rules.
const res = await env.fetch("https://api.weather.com/v1/forecast?city=SF");
if (!res.ok) {
return { error: "Upstream error: " + res.status };
}
return await res.json();
Public .pulse config
env.pulse
Free, Creator, Pro
Read tunable, non-secret defaults you set in a .pulse config file.
Usage: Put public values in .pulse and read them as env.pulse.NAME inside server-side Pulses. Secrets and wiring never live here.
const units = env.pulse.DEFAULT_UNITS || "metric";
const queue = env.pulse.SUPPORT_QUEUE || "support";
return { units, queue };
Structured logs + sanitized request access
env.log + env.request
Free, Creator, Pro
Write structured runtime logs and read sanitized request details.
Usage: Use env.log directly for structured logging and env.request for sanitized metadata — never platform credential headers. env.waitUntil is only best-effort after-response work, not durable processing.
const url = new URL(env.request.url);
env.log.info("pulse.request", { path: url.pathname });
return { received: true, path: url.pathname };