You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove the shared default instance behind service hosts
A service host like github.emulators.dev used to be a stateful shared
instance: a well-known URL with world-readable state and a world-writable
control plane, which is exactly the polling target the unguessable
instance names were introduced to prevent. Service hosts are now control
plane only (manifest, quickstart, specs, coverage, connections, openapi,
and instance creation); provider routes return a 404 that points at
POST /_emulate/instances. Named instances, the path form, and the shared
MCP preset instances are unchanged. The console no longer pins service
hosts to a default instance and addresses instances via the apex path
form.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,7 +159,7 @@ github:
159
159
All services are available on host-based routing when deployed: `github`, `gitlab`, `mcp`, `vercel`, `google`, `okta`, `microsoft`, `spotify`, `slack`, `apple`, `aws`, `resend`, `stripe`, `mongoatlas`, `clerk`, `x`, `workos`, `autumn`, and `posthog`. Each one supports three addressing forms:
160
160
161
161
```text
162
-
https://github.emulators.dev # service host (no instance)
162
+
https://github.emulators.dev # service host (control plane only)
https://emulators.dev/github/my-instance # local/path form
165
165
```
@@ -170,7 +170,7 @@ Create instances with `POST /_emulate/instances`: the server generates an ungues
170
170
171
171
### Useful without an instance
172
172
173
-
The bare service host (for example `https://github.emulators.dev`) serves a service-level control plane so a human or agent can learn what the service is and connect without first creating an instance. It responds to `GET /_emulate`, `/_emulate/manifest`, `/_emulate/quickstart`, `/_emulate/specs`, `/_emulate/coverage`, `/_emulate/connections`, `/_emulate/openapi`, and `POST /_emulate/instances`.
173
+
The bare service host (for example `https://github.emulators.dev`) serves a service-level control plane so a human or agent can learn what the service is and connect without first creating an instance. It responds to `GET /_emulate`, `/_emulate/manifest`, `/_emulate/quickstart`, `/_emulate/specs`, `/_emulate/coverage`, `/_emulate/connections`, `/_emulate/openapi`, and `POST /_emulate/instances`. There is no shared instance behind the service host: provider routes return a 404 pointing at instance creation, so all provider traffic happens on an instance of your own.
174
174
175
175
A global catalog lists every hosted service from any host, including the apex:
Copy file name to clipboardExpand all lines: apps/web/app/docs/architecture/page.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ The core provides shared middleware:
80
80
The `@emulators/cloudflare` package runs the same plugins on Cloudflare Workers with host-based routing. The `emulate-hosts` worker serves `emulators.dev/*` and `*.emulators.dev/*`:
81
81
82
82
- The apex `emulators.dev` is the emulator catalog, a links-out landing built from `GET /_emulate/services`. It is not the docs site.
83
-
- A service host such as `github.emulators.dev` serves a service-level control plane and is useful before any instance exists.
83
+
- A service host such as `github.emulators.dev` serves a service-level control plane and is useful before any instance exists. It has no shared instance of its own; provider traffic requires a created instance.
84
84
- An instance host such as `github.my-run.emulators.dev` (or the compatibility path form `emulators.dev/github/my-run`) serves one stateful instance.
85
85
86
86
Each instance is backed by one Cloudflare Durable Object. The `EmulatorDurableObject` class is declared through a wrangler `migrations` entry (`new_classes`), and both the instance state and the request ledger are snapshotted to Durable Object storage so an instance survives eviction. Instances are created lazily through `POST /_emulate/instances`.
A bare service host such as `https://github.emulators.dev`, with no instance, serves a service-level control plane so it is useful before you create an instance:
73
+
A bare service host such as `https://github.emulators.dev`, with no instance, serves a service-level control plane so it is useful before you create an instance. There is no shared instance behind it; provider routes return a 404 that points at instance creation:
// Provider routes have no shared instance to serve: point the caller at
187
+
// instance creation instead.
188
+
returnResponse.json(
189
+
{
190
+
error: "instance_required",
191
+
message: `${service}.${suffix} is a service host with no shared instance. Create one with POST ${url.protocol}//${service}.${suffix}/_emulate/instances and use the returned providerBaseUrl.`,
<p class="info-text">Each service host serves <code>/_emulate/manifest</code>, <code>/_emulate/quickstart</code>, and <code>/_emulate/connections</code>, and the provider API directly against a default instance.</p>
190
+
<p class="info-text">Each service host serves <code>/_emulate/manifest</code>, <code>/_emulate/quickstart</code>, and <code>/_emulate/connections</code>, plus <code>POST /_emulate/instances</code> to create a private instance for provider traffic.</p>
0 commit comments