Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/src/content/docs/actors/access-control.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@ Returning `undefined`, `null`, or any non-boolean throws an internal error.
## Notes

- `canPublish` only applies to queue names defined in `queues`.
- Incoming queue messages for undefined queues are ignored and logged as warnings.
- Incoming queue messages for undefined queues are ignored and the publish succeeds as completed.
- `canSubscribe` only applies to event names defined in `events`.
- Broadcasting an event not defined in `events` logs a warning but still publishes.
- Broadcasting an event not defined in `events` still publishes to subscribers.
1 change: 0 additions & 1 deletion website/src/content/docs/actors/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ See [types](/docs/actors/types) for more details on using `ActionContextOf` and

- `GET /inspector/rpcs` lists all available actions on an actor.
- `POST /inspector/action/:name` executes an action with JSON args and returns output.
- `GET /inspector/traces` helps inspect action timings and failures.
- In non-dev mode, inspector endpoints require authorization.

## API Reference
Expand Down
301 changes: 0 additions & 301 deletions website/src/content/docs/actors/ai-and-user-generated-actors.mdx

This file was deleted.

4 changes: 3 additions & 1 deletion website/src/content/docs/actors/appearance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,12 @@ const myCustomRunHandler = (_options: Record<string, unknown>) => ({

const myActor = actor({
run: myCustomRunHandler({ /* options */ }),
// Automatically gets "My Custom Handler" name and "bolt" icon
// Picks up "My Custom Handler" name and "bolt" icon in registry metadata
});
```

This run-handler metadata is currently applied through the registry and serverless metadata paths. The native runtime and inspector config read the actor's `options.name` and `options.icon` directly, so set those explicitly if you need the name or icon to appear everywhere.

Actor-level `options.name` and `options.icon` always take precedence, allowing users to override library defaults:

```typescript
Expand Down
6 changes: 3 additions & 3 deletions website/src/content/docs/actors/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function showError(message: string) {
}

const conn = actorHandle.connect();
conn.on("error", (error: ActorError) => {
conn.onError((error: ActorError) => {
if (error.code === "forbidden") {
window.location.href = "/login";
} else if (error.code === "insufficient_permissions") {
Expand Down Expand Up @@ -596,5 +596,5 @@ const cachedAuthActor = actor({
## API Reference

- [`AuthIntent`](/typedoc/types/rivetkit.mod.AuthIntent.html) - Authentication intent type
- [`BeforeConnectContext`](/typedoc/interfaces/rivetkit.mod.BeforeConnectContext.html) - Context for auth checks
- [`ConnectContext`](/typedoc/interfaces/rivetkit.mod.ConnectContext.html) - Context after connection
- [`OnBeforeConnectContext`](/typedoc/interfaces/rivetkit.mod.OnBeforeConnectContext.html) - Context for auth checks
- [`OnConnectContext`](/typedoc/interfaces/rivetkit.mod.OnConnectContext.html) - Context after connection
10 changes: 5 additions & 5 deletions website/src/content/docs/actors/connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Connections are not visible in `c.conns` until `createConnState` completes succe

### `onBeforeConnect`

[API Reference](/typedoc/interfaces/rivetkit.mod.BeforeConnectContext.html)
[API Reference](/typedoc/interfaces/rivetkit.mod.OnBeforeConnectContext.html)

The `onBeforeConnect` hook is called whenever a new client connects to the actor. Can be async. Clients can pass parameters when connecting, accessible via `params`. This hook is used for connection validation and can throw errors to reject connections.

Expand Down Expand Up @@ -265,7 +265,7 @@ Connections cannot interact with the actor until this method completes successfu

### `onConnect`

[API Reference](/typedoc/interfaces/rivetkit.mod.ConnectContext.html)
[API Reference](/typedoc/interfaces/rivetkit.mod.OnConnectContext.html)

Executed after the client has successfully connected. Can be async. Receives the connection object as a second parameter.

Expand Down Expand Up @@ -355,7 +355,7 @@ const chatRoom = actor({

## Connection List

All active connections can be accessed through the context object's `conns` property. This is an array of all current connections.
All active connections can be accessed through the context object's `conns` property. This is a `Map<string, Conn>` of all current connections, keyed by connection ID.

This is frequently used with `conn.send(name, event)` to send messages directly to clients. To send an event to all connections at once, use `c.broadcast()` instead. See [Events](/docs/actors/events) for more details on broadcasting.

Expand Down Expand Up @@ -457,6 +457,6 @@ This ensures the underlying network connections close cleanly before continuing.
- [`Conn`](/typedoc/interfaces/rivetkit.mod.Conn.html) - Connection interface
- [`ConnInitContext`](/typedoc/interfaces/rivetkit.mod.ConnInitContext.html) - Connection initialization context
- [`CreateConnStateContext`](/typedoc/interfaces/rivetkit.mod.CreateConnStateContext.html) - Context for creating connection state
- [`BeforeConnectContext`](/typedoc/interfaces/rivetkit.mod.BeforeConnectContext.html) - Pre-connection lifecycle hook context
- [`ConnectContext`](/typedoc/interfaces/rivetkit.mod.ConnectContext.html) - Post-connection lifecycle hook context
- [`OnBeforeConnectContext`](/typedoc/interfaces/rivetkit.mod.OnBeforeConnectContext.html) - Pre-connection lifecycle hook context
- [`OnConnectContext`](/typedoc/interfaces/rivetkit.mod.OnConnectContext.html) - Post-connection lifecycle hook context
- [`ActorConn`](/typedoc/types/rivetkit.client_mod.ActorConn.html) - Typed connection from client side
Loading
Loading