Platforms
| Platform | Integration | Writes |
|---|---|---|
| Cloudflare Workers | Complete companion | Approval-managed |
| Hono | Mount the companion handler | Approval-managed when the server supplies policy |
| SvelteKit | Mount the companion in a server route | Approval-managed when the server supplies policy |
| Static HTML | Generate a manifest and bootstrap at build time | Never |
Hono
Create the companion exactly as shown in the Worker quickstart, then mount its standard Request/Response handler:
TypeScript
app.all("/__mulder/*", async (c) => {
return await companion.handle(c.req.raw) ?? c.notFound();
});SvelteKit
Keep the companion in a server-only module. Put this handler in src/routes/__mulder/[...path]/+server.ts:
TypeScript
import type { RequestHandler } from "./$types";
import { companion } from "$lib/server/mulder";
const handle: RequestHandler = async ({ request }) => {
return await companion.handle(request) ?? new Response(null, { status: 404 });
};
export { handle as GET, handle as POST };Static HTML
Static mode calls an explicitly configured public HTTPS API directly from the visitor’s browser. The API must allow the site with CORS.
TypeScript
import { mkdir, writeFile } from "node:fs/promises";
import { generateStaticWebMcp } from "@acoyfellow/mulder";
const files = generateStaticWebMcp(openApiDocument, {
apiOrigin: "https://public-api.example"
});
await mkdir("public/__mulder", { recursive: true });
await writeFile("public/__mulder/manifest.json", files.manifest);
await writeFile("public/__mulder/bootstrap.js", files.bootstrap);Code
<script type="module" src="/__mulder/bootstrap.js"></script>Static means public. Generated requests omit credentials and reject redirects. Static mode rejects every enabled POST and DELETE operation; disabled operations stay omitted. Never put API keys, cookies, approval secrets, private capabilities, or user data in its OpenAPI document or generated files.
What is not provided
There are no Hono or SvelteKit adapter packages. Both frameworks already expose standard web requests and responses, so another abstraction would add maintenance without adding capability.