v1.3.0: SvelteKit + Cloudflare Workers
First major framework expansion since launch. ai-codex now supports SvelteKit projects with the same output shape as Next.js.
Added
- SvelteKit adapter (
src/adapters/sveltekit.ts)+page.svelte,+page.server.ts,+server.ts,+layout.sveltedetection- Route groups
(name), optional params[[opt]], catch-all[...rest] - Detects both function-export and const-export server route handlers
- Both
.tsand.jsvariants supported
- Cloudflare Workers bindings extraction
- Parses
wrangler.jsonc/wrangler.toml - Surfaces D1, R2, KV, AI, Durable Object, and Service bindings in the index
- Parses
- Adapter architecture
- Per-framework files under
src/adapters/ - Cheaper to add new frameworks; Next.js logic isolated from SvelteKit logic
- Per-framework files under
- Test suite
- 53 vitest tests
- Includes a Next.js pipeline integration test that byte-compares generated output against checked-in fixture snapshots
- Negation patterns in `files` array
- `.test.ts` / `.test.js` excluded from the npm tarball
Credits
External PR #5 by @raiden076. SvelteKit groundwork, Cloudflare bindings, and the adapter refactor were their work. Thank you.
Install
```
npx ai-codex@1.3.0
```