Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 4 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,9 @@ git commit -m "chore(my-pkg): foo bar"
- If `rivetkit` type or DTS builds fail with missing `@rivetkit/*` declarations, run `pnpm build -F rivetkit` from repo root (Turbo build path) before changing TypeScript `paths`.
- Do not add temporary `@rivetkit/*` path aliases in `rivetkit-typescript/packages/rivetkit/tsconfig.json` to work around stale or missing built declarations.

### RivetKit Driver Registry Variants
- Keep `rivetkit-typescript/packages/rivetkit/fixtures/driver-test-suite/registry.ts` as the canonical type anchor for fixtures and test typing.
- Run driver runtime suites through `registry-static.ts` and `registry-dynamic.ts` instead of executing `registry.ts` directly.
- Load static fixture actors with dynamic ESM `import()` from the `fixtures/driver-test-suite/actors/` directory.
- Skip dynamic registry parity only for the explicit nested dynamic harness gate or missing secure-exec dist, and still treat full static and dynamic compatibility as the target for all normal driver suites.
### RivetKit Test Fixtures
- Keep RivetKit test fixtures scoped to the engine-only runtime.
- Prefer targeted integration tests under `rivetkit-typescript/packages/rivetkit/tests/` over shared multi-driver matrices.

### SQLite Package
- Use `@rivetkit/sqlite` for SQLite WebAssembly support.
Expand Down Expand Up @@ -287,7 +285,7 @@ let error_with_meta = ApiRateLimited { limit: 100, reset_at: 1234567890 }.build(

**Inspector HTTP API**
- When updating the WebSocket inspector (`rivetkit-typescript/packages/rivetkit/src/inspector/`), also update the HTTP inspector endpoints in `rivetkit-typescript/packages/rivetkit/src/actor/router.ts`. The HTTP API mirrors the WebSocket inspector for agent-based debugging.
- When adding or modifying inspector endpoints, also update the driver test at `rivetkit-typescript/packages/rivetkit/src/driver-test-suite/tests/actor-inspector.ts` to cover all inspector HTTP endpoints.
- When adding or modifying inspector endpoints, also update the relevant RivetKit tests in `rivetkit-typescript/packages/rivetkit/tests/` to cover all inspector HTTP endpoints.
- When adding or modifying inspector endpoints, also update the documentation in `website/src/metadata/skill-base-rivetkit.md` and `website/src/content/docs/actors/debugging.mdx` to keep them in sync.

**Database Usage**
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ Works with Claude Code, Cursor, Windsurf, and other AI coding tools.
- [Node.js & Bun](https://www.rivet.dev/docs/actors/quickstart/backend)
- [React](https://www.rivet.dev/docs/actors/quickstart/react)
- [Next.js](https://www.rivet.dev/docs/actors/quickstart/next-js)
- [Cloudflare Workers](https://www.rivet.dev/docs/actors/quickstart/cloudflare-workers)

[View documentation →](https://www.rivet.dev/docs)

Expand All @@ -237,7 +236,7 @@ Serverless, containers, or your own servers — Rivet Actors work with your exis

**Frameworks**: [React](https://www.rivet.dev/docs/clients/react) • [Next.js](https://www.rivet.dev/docs/clients/next-js) • [Hono](https://github.com/rivet-dev/rivet/tree/main/examples/hono) • [Express](https://github.com/rivet-dev/rivet/tree/main/examples/express) • [Elysia](https://github.com/rivet-dev/rivet/tree/main/examples/elysia) • [tRPC](https://github.com/rivet-dev/rivet/tree/main/examples/trpc)

**Runtimes**: [Node.js](https://www.rivet.dev/docs/actors/quickstart/backend) • [Bun](https://www.rivet.dev/docs/actors/quickstart/backend) • [Deno](https://github.com/rivet-dev/rivet/tree/main/examples/deno) • [Cloudflare Workers](https://www.rivet.dev/docs/actors/quickstart/cloudflare-workers)
**Runtimes**: [Node.js](https://www.rivet.dev/docs/actors/quickstart/backend) • [Bun](https://www.rivet.dev/docs/actors/quickstart/backend) • [Deno](https://github.com/rivet-dev/rivet/tree/main/examples/deno)

**Tools**: [Vitest](https://www.rivet.dev/docs/actors/testing) • [Pino](https://www.rivet.dev/docs/general/logging) • [AI SDK](https://github.com/rivet-dev/rivet/tree/main/examples/ai-agent) • [OpenAPI](https://github.com/rivet-dev/rivet/tree/main/rivetkit-openapi) • [AsyncAPI](https://github.com/rivet-dev/rivet/tree/main/rivetkit-asyncapi)

Expand Down Expand Up @@ -270,4 +269,4 @@ Serverless, containers, or your own servers — Rivet Actors work with your exis

## License

[Apache 2.0](LICENSE)
[Apache 2.0](LICENSE)
12 changes: 6 additions & 6 deletions docs-internal/rivetkit-typescript/DYNAMIC_ACTORS_ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ Dynamic actors let a registry entry resolve actor source code at actor start tim
Dynamic actors are represented by `dynamicActor({ load, auth?, options? })`
and still participate in normal registry routing and actor lifecycle.

Driver parity is verified by running the same driver test suites against two
fixture registries:
Dynamic actor parity is verified by running the same engine-focused integration
tests against two fixture registries:

- `fixtures/driver-test-suite/registry-static.ts`
- `fixtures/driver-test-suite/registry-dynamic.ts`
- `examples/sandbox/src/index.ts` for shared actor behavior
- dedicated static and dynamic registry fixtures in test coverage

Both registries are built from `fixtures/driver-test-suite/actors/` to keep
actor behavior consistent between static and dynamic execution.
The shared actor fixtures keep behavior consistent between static and dynamic
execution.

## Main Components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export interface DynamicStartupOptions {
### Backoff Implementation

Reuse the `p-retry` exponential backoff algorithm that is already used in
`remote-manager-driver/metadata.ts` and `client/actor-conn.ts`. The
`engine-client/metadata.ts` and `client/actor-conn.ts`. The
implementation does not need to use `p-retry` directly (since retries are
passive, not loop-driven), but must compute backoff delays using the same
formula: `min(maxDelay, initialDelay * multiplier^attempt)` with optional
Expand Down Expand Up @@ -658,9 +658,9 @@ Comments should explain intent and invariants, not implementation history.

## Test Requirements

All failed-start tests must be added to the shared driver-test-suite
(`src/driver-test-suite/`) so both file-system and engine drivers run the same
test cases. This enforces the parity requirement.
All failed-start tests must be added to the shared engine-focused integration
suite so the runtime path uses one common set of cases. This enforces the
parity requirement.

Add or update tests for:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,15 @@ All data crosses the bridge as JSON strings:

## Testing

Add a driver test in `src/driver-test-suite/tests/` that:
Add an engine-focused integration test that:

1. Creates a dynamic actor that uses `db()` (raw) with a simple schema
2. Runs migrations, inserts rows, queries them back
3. Verifies data persists across actor sleep/wake cycles
4. Creates a dynamic actor that uses `db()` from `rivetkit/db/drizzle` with schema + migrations
5. Verifies drizzle queries work through the proxy

Add corresponding fixture actors in `fixtures/driver-test-suite/`.
Add corresponding fixture actors in the shared sandbox-style test fixtures.

## Files to modify

Expand All @@ -263,8 +263,8 @@ Add corresponding fixture actors in `fixtures/driver-test-suite/`.
| `src/dynamic/isolate-runtime.ts` | Wire `sqliteExec`/`sqliteBatch` refs in `#setIsolateBridge()` |
| `src/dynamic/host-runtime.ts` | Wire bridge refs + add `overrideRawDatabaseClient` to isolate-side `actorDriver` |
| `src/db/drizzle/mod.ts` | Add override check at top of `createClient` |
| `src/driver-test-suite/tests/` | New test file for dynamic SQLite proxy |
| `fixtures/driver-test-suite/` | New fixture actors using `db()` in dynamic actors |
| `tests/` | New engine-focused integration test for dynamic SQLite proxy |
| shared test fixtures | New fixture actors using `db()` in dynamic actors |
| `docs-internal/rivetkit-typescript/DYNAMIC_ACTORS_ARCHITECTURE.md` | Document SQLite proxy bridge |

## Non-goals
Expand Down
2 changes: 1 addition & 1 deletion engine/sdks/typescript/api-full/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/actor-actions/vite.config.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 0 additions & 34 deletions examples/cloudflare-workers-hono/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions examples/cloudflare-workers-hono/package.json

This file was deleted.

9 changes: 0 additions & 9 deletions examples/cloudflare-workers-hono/scripts/client.ts

This file was deleted.

22 changes: 0 additions & 22 deletions examples/cloudflare-workers-hono/src/index.ts

This file was deleted.

15 changes: 0 additions & 15 deletions examples/cloudflare-workers-hono/src/registry.ts

This file was deleted.

43 changes: 0 additions & 43 deletions examples/cloudflare-workers-hono/tsconfig.json

This file was deleted.

9 changes: 0 additions & 9 deletions examples/cloudflare-workers-hono/turbo.json

This file was deleted.

30 changes: 0 additions & 30 deletions examples/cloudflare-workers-hono/wrangler.json

This file was deleted.

34 changes: 0 additions & 34 deletions examples/cloudflare-workers-inline-client/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions examples/cloudflare-workers-inline-client/scripts/client-http.ts

This file was deleted.

Loading
Loading