docs(actors): sync from rivet-dev/rivet - #100
Conversation
|
🚅 Deployed to the website-pr-100 environment in rivet-website
|
|
|
||
| For one actor, use its handle. The default is only `actor_gateway: ["read"]`, scoped to that actor ID: | ||
|
|
||
| ```ts |
There was a problem hiding this comment.
🟠 Medium · Move the token examples into checked snippet files
These three new fences bypass this repository's required examples/docs/ + <CodeSnippet> path, and they are not standalone TypeScript: client and session are undefined, while the second fence also depends on user from the previous fence. That leaves the newly documented API outside the snippet type-check that is meant to catch SDK drift. Add complete examples under examples/docs/actors-authentication/ (including imports and setup) and embed them with <CodeSnippet>; make a workspace CodeGroup if the setup spans files. Because this directory is vendored, make the correction in the upstream bundle and resync it.
| </Tab> | ||
| </Tabs> | ||
|
|
||
| ## Issue Engine Access Tokens |
There was a problem hiding this comment.
🟠 Medium · Use the website's canonical control-plane terminology
The added heading and surrounding copy repeatedly expose the internal name “Engine” (and “server”) to users, while this repository's terminology contract requires “control plane” for the service that routes, schedules, and persists Actors. The same new section also uses lowercase “actor” in prose even though website copy requires “Actor.” Rewrite the added user-facing text with “control plane” and capitalized “Actor”; since this is vendored content, apply that upstream and resync.
3b987e7 to
99fa53d
Compare
|
|
||
| Permissions are enforced inside your actor, on a caller that has already reached it. This is the only layer that can see `c.state`, `c.key`, and action arguments, so every domain rule lives here. | ||
|
|
||
| The layer above it decides which actor a client may reach at all. See [Authentication](/docs/authentication) for that, and [JWTs](/docs/jwt) to scope a client to a single actor before it ever gets here. |
There was a problem hiding this comment.
🟠 Medium · Ship the shared authentication routes before linking to them
Neither /docs/authentication nor /docs/jwt has a backing MDX file or sidebar entry in this repository's general docs bundle (vendor/docs/docs/content), yet this change points multiple pages at those routes and deletes /actors/docs/authentication. The existing redirect for the deleted route also lands on the missing /docs/authentication, so both new navigation and old inbound links end in 404s. Sync the general authentication/JWT pages and sidebar in this change, or keep the existing Actor page and links until those routes are available.
| The token decides which actor Alice reaches. It cannot decide what she may do there, because the control plane does not know what your actions mean. Check that in the actor. | ||
|
|
||
| <CodeSnippet file="examples/docs/actors-permissions/quickstart/index.ts" title="document.ts" /> | ||
|
|
There was a problem hiding this comment.
🟠 Medium · Make the end-to-end guide use one runnable Actor example
The server and browser snippets above use general-jwt/quickstart/registry.ts, whose userProfile Actor only exposes recordVisit and setDisplayName; this step then swaps in the unrelated permissions quickstart's document Actor, which expects an authToken connection param that the browser never sends. The advertised flow therefore never demonstrates the admin authorization described by the guide. There is a second integration break in general-jwt/quickstart/client.ts: the guide configures the issuing server for http://localhost:6420, but the browser hard-codes https://api.rivet.dev, so the locally issued token is presented to a different control plane. Build this guide from one workspace example whose server, client, endpoint, registry, and authorization action all match, then embed those same files in each step.
| description: "Identify callers when they connect to a Rivet Actor, then authorize every action, queue publish, and event subscription with deny-by-default rules." | ||
| skill: true | ||
| --- | ||
|
|
There was a problem hiding this comment.
🟠 Medium · Capitalize Actor throughout the new user-facing copy
The new pages repeatedly use lowercase “actor” in prose (for example “inside your actor,” “which actor,” and “actor state”), while this website's terminology contract requires the product noun “Actor” to be capitalized everywhere in user-facing copy. The new authentication guide has the same issue. Update the upstream bundle to use “Actor” consistently and resync the vendored content.
Automated docs sync from
rivet-dev/rivet@d34ced2.Do not edit
vendor/actors/here. Edit the docs inrivet-dev/rivetand this PR updates itself.