Skip to content

Commit 93a168f

Browse files
NathanFlurryNathanFlurry
andauthored
docs: move public docs into a docs/ bundle for rivet.dev (#5559)
Co-authored-by: NathanFlurry <anthropic@nathanflurry.com>
1 parent 69fcebf commit 93a168f

1,925 files changed

Lines changed: 1695 additions & 67117 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/reference/docs-sync.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ When making engine or RivetKit changes, keep documentation in sync. Check this t
2121
| **RivetKit config** (`rivetkit-typescript/packages/rivetkit/src/registry/config/index.ts`, `rivetkit-typescript/packages/rivetkit/src/actor/config.ts`) | `website/src/content/docs/actors/limits.mdx` if they affect limits/timeouts |
2222
| **Actor errors** (`ActorError` in `engine/packages/types/src/actor/error.rs`, `RunnerPoolError`) | `website/src/content/docs/actors/troubleshooting.mdx` — each error should document the dashboard message (from `frontend/src/components/actors/actor-status-label.tsx`) and the API JSON shape |
2323
| **Actor statuses** (`frontend/src/components/actors/queries/index.ts` derivation) | `website/src/content/docs/actors/statuses.mdx` + tests in `frontend/src/components/actors/queries/index.test.ts` |
24-
| **Kubernetes manifests** (`self-host/k8s/engine/`) | `website/src/content/docs/self-hosting/kubernetes.mdx`, `self-host/k8s/README.md`, and `scripts/run/k8s/engine.sh` if file names or deployment steps change |
24+
| **Kubernetes manifests** (`self-host/control-plane/kubernetes/`) | `website/src/content/docs/self-hosting/kubernetes.mdx`, `self-host/control-plane/kubernetes/README.md`, and `scripts/run/k8s/engine.sh` if file names or deployment steps change |
2525
| **Landing page** (`website/src/pages/index.astro` + section components in `website/src/components/marketing/sections/`) | `README.md` — reflect the same headlines, features, benchmarks, and talking points where applicable |
2626
| **Sandbox providers** (`rivetkit-typescript/packages/rivetkit/src/sandbox/providers/`) | `website/src/content/docs/actors/sandbox.mdx` — provider docs, option tables, custom provider guidance |
27-
| **Inspector endpoints** | `website/src/metadata/skill-base-rivetkit.md` + `website/src/content/docs/actors/debugging.mdx` |
27+
| **Inspector endpoints** | `docs/content/docs/debugging.mdx` — AI skills are generated from the docs, so there is no separate skill file to update |
2828
| **rivetkit-core state management** (`request_save`, `save_state`, `persist_state`, `set_state_initial` semantics) | `docs-internal/engine/rivetkit-core-state-management.md` |

.github/workflows/docs-sync.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync docs
2+
3+
# Docs live here; rivet.dev publishes them. On merge to main this copies the
4+
# docs/ bundle into the website's vendor/actors and opens a PR there, which is also
5+
# what triggers the site rebuild.
6+
on:
7+
push:
8+
branches: [main]
9+
paths: ["docs/**"]
10+
workflow_dispatch:
11+
12+
jobs:
13+
sync:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: rivet-dev/rivet-website/.github/actions/sync-docs@main
18+
with:
19+
product: actors
20+
token: ${{ secrets.RIVET_WEBSITE_TOKEN }}
21+
extra-paths: >-
22+
examples/docs
23+
examples/vercel-workflow
24+
self-host/workers
25+
self-host/control-plane
26+
rivetkit-typescript/artifacts
27+
rivetkit-typescript/packages/rivetkit/package.json
28+
engine/artifacts/config-schema.json
29+
rivetkit-openapi/openapi.json

.github/workflows/frontend.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
- frontend/**
88
- engine/sdks/typescript/**
99
- rivetkit-typescript/**
10-
- website/**
11-
1210
concurrency:
1311
group: frontend-${{ github.ref }}
1412
cancel-in-progress: true

.github/workflows/skills.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

docs

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

docs/CLAUDE.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# Docs Bundle CLAUDE.md
2+
3+
Rules for the docs in this repo. These pages are **not** rendered here — they are
4+
published on [rivet.dev](https://rivet.dev) by the
5+
[rivet-website](https://github.com/rivet-dev/website) repo, which symlinks
6+
this directory in. Everything below exists so a page written here renders
7+
correctly there.
8+
9+
## Layout
10+
11+
```
12+
docs/
13+
sidebar.json navigation for the two tabs
14+
content/
15+
docs/**.mdx -> /{product}/docs/...
16+
tutorials/**.mdx -> /{product}/tutorials/...
17+
```
18+
19+
The website links `docs/content` into its content collection, so **only real
20+
pages belong under `content/`**. Anything else (scripts, fixtures, notes) goes
21+
elsewhere in the repo or it will be published as a docs page.
22+
23+
## Frontmatter
24+
25+
Every page needs `title` and `description`. Both are used for SEO and the
26+
sidebar falls back to `title` when a sidebar entry omits one.
27+
28+
```mdx
29+
---
30+
title: "In-Memory State"
31+
description: "Actors store state in memory for instant reads and writes."
32+
---
33+
```
34+
35+
## sidebar.json
36+
37+
Navigation for this product's Documentation and Tutorials tabs. Icons travel as
38+
Font Awesome **export names**, not objects, so this repo needs no dependency on
39+
the website's icon package.
40+
41+
```json
42+
{
43+
"docs": [
44+
{ "title": "General", "pages": [
45+
{ "title": "Introduction", "href": "/actors/docs", "icon": "faSquareInfo" }
46+
]}
47+
],
48+
"tutorials": []
49+
}
50+
```
51+
52+
- `href` is the full site path, including the product segment.
53+
- Adding a page to `content/` does not add it to the nav. Add it here too.
54+
- The Self-Host tab is **not** in this file. It is generated by the website.
55+
56+
## Code
57+
58+
- **Never inline a fenced TypeScript block.** Real examples live in `examples/`
59+
and are embedded with `<CodeSnippet>`, so they are type-checked and cannot rot.
60+
A snippet that fails to compile fails the website build.
61+
- Snippet paths are relative to **this repo's root**, so the same path works both
62+
here and on rivet.dev:
63+
```mdx
64+
<CodeSnippet file="examples/docs/actors-state/durable-basic.ts" />
65+
```
66+
- Embed part of a file with `region="name"`, delimited in the source by
67+
`// docs:start name` / `// docs:end name`.
68+
- Shell commands, YAML, Dockerfiles, and terminal output **may** be inline fenced
69+
blocks. The no-inline rule exists for type checking, which only applies to
70+
TypeScript.
71+
- Every TypeScript snippet must include its imports and define everything it
72+
references. Use `@nocheck` only for API that does not exist on this branch yet.
73+
- Use `<CodeGroup workspace>` for examples spanning multiple files, with each
74+
file as its own `<CodeSnippet>`.
75+
76+
## What does not belong here
77+
78+
- **Marketing pages.** They live in the website repo.
79+
- **Deploy and self-hosting guides.** They are written once in the website repo
80+
and templated across every product. Do not write a per-product copy.
81+
- **Website components.** Do not import from the website by relative path or
82+
alias; a page must render from the components the site already provides.
83+
84+
## Terminology
85+
86+
Applies to everything published on the website.
87+
88+
- The service that routes, schedules, and persists is the **control plane**.
89+
Never "engine", "server", or "orchestrator".
90+
- A process running user code with the Rivet SDK is a **worker**. Never "envoy",
91+
"runner", "node", "compute", or "data plane".
92+
- **Never use "agent" as a deployment noun.** Rivet ships agentOS and Actors is
93+
"where agents live"; the collision is unrecoverable.
94+
- **"envoy" never appears in docs.** Envoy Proxy is a top-tier CNCF project.
95+
Internal code keeps its own names.
96+
- **"Rivet Compute" is retired.** Where prose must name the managed offering it
97+
is **Rivet Cloud**, and it links to <https://dashboard.rivet.dev>.
98+
- Spell the product `agentOS`, never `AgentOS`. Capitalize **Rivet Actor** as a
99+
proper noun, lowercase generic "actor".
100+
- Always `rivet.dev`, never `rivet.gg`.
101+
102+
## Writing
103+
104+
- Write comments and prose as complete sentences. **Never use em dashes**; use
105+
periods instead.
106+
- Do not document deltas. A reader who never saw the old version gains nothing
107+
from "this was renamed".
108+
109+
## Previewing locally
110+
111+
Clone the website next to this repo and run it. It detects the sibling
112+
automatically and serves this directory's pages live:
113+
114+
```sh
115+
git clone https://github.com/rivet-dev/website
116+
cd rivet-website && pnpm install && pnpm dev
117+
```
118+
119+
`pnpm assemble` prints which checkout each product resolved to. To point at a
120+
different checkout, repoint the symlink; it is gitignored and assemble leaves an
121+
existing one alone:
122+
123+
```sh
124+
ln -sfn /path/to/this/repo/docs/content src/content/docs/<product>
125+
```

website/src/content/docs/actors/access-control.mdx renamed to docs/content/docs/access-control.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Use access control to decide what authenticated clients are allowed to do.
88

99
This is authorization, not authentication:
1010

11-
- Use [authentication](/docs/actors/authentication) to identify who is calling.
11+
- Use [authentication](/actors/docs/authentication) to identify who is calling.
1212
- Use access-control rules to decide what they can do after connecting.
1313

1414
## Permission Surfaces

website/src/content/docs/actors/actions.mdx renamed to docs/content/docs/actions.mdx

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ description: "Actions are how your backend, frontend, or other actors can commun
44
skill: true
55
---
66

7-
Actions are very lightweight. They can be called thousands of times per second safely. Actions are executed via HTTP requests or via WebSockets if [using `.connect()`](/docs/actors/connections).
7+
Actions are very lightweight. They can be called thousands of times per second safely. Actions are executed via HTTP requests or via WebSockets if [using `.connect()`](/actors/docs/connections).
88

9-
For advanced use cases that require direct access to HTTP requests or WebSocket connections, see [raw HTTP and WebSocket handling](/docs/actors/fetch-and-websocket-handler).
9+
For advanced use cases that require direct access to HTTP requests or WebSocket connections, see [raw HTTP and WebSocket handling](/actors/docs/fetch-and-websocket-handler).
1010

11-
By default, actions run in parallel. If you need advanced control over concurrency, use [queues](/docs/actors/queues).
11+
By default, actions run in parallel. If you need advanced control over concurrency, use [queues](/actors/docs/queues).
1212

1313
## Writing Actions
1414

@@ -35,21 +35,21 @@ Actions can be called in different ways depending on your use case:
3535

3636
<CodeSnippet file="examples/docs/actors-actions/calling-frontend.ts" title="frontend.ts" />
3737

38-
Learn more about [communicating with actors from the frontend](/docs/actors/communicating-between-actors).
38+
Learn more about [communicating with actors from the frontend](/actors/docs/communicating-between-actors).
3939

4040
</Tab>
4141
<Tab title="Backend (registry.handler)">
4242

4343
<CodeSnippet file="examples/docs/actors-actions/calling-backend.ts" title="server.ts" />
4444

45-
Learn more about [communicating with actors from the backend](/docs/actors/communicating-between-actors).
45+
Learn more about [communicating with actors from the backend](/actors/docs/communicating-between-actors).
4646

4747
</Tab>
4848
<Tab title="Actor-to-Actor (c.client())">
4949

5050
<CodeSnippet file="examples/docs/actors-actions/calling-actor.ts" title="actor.ts" />
5151

52-
Learn more about [communicating between actors](/docs/actors/communicating-between-actors).
52+
Learn more about [communicating between actors](/actors/docs/communicating-between-actors).
5353

5454
</Tab>
5555
</Tabs>
@@ -108,15 +108,15 @@ For example, to validate action parameters:
108108

109109
## Streaming Data
110110

111-
Actions have a single return value. To stream realtime data in response to an action, use [events](/docs/actors/events).
111+
Actions have a single return value. To stream realtime data in response to an action, use [events](/actors/docs/events).
112112

113113
## Canceling Long-Running Actions
114114

115115
For operations that should be cancelable on-demand, create your own `AbortController`. Chain it with `c.abortSignal` so actor shutdown also cancels the operation.
116116

117117
<CodeSnippet file="examples/docs/actors-actions/canceling-actions.ts" />
118118

119-
See [Actor Shutdown Abort Signal](/docs/actors/lifecycle#actor-shutdown-abort-signal) for automatically canceling operations when the actor stops.
119+
See [Actor Shutdown Abort Signal](/actors/docs/lifecycle#actor-shutdown-abort-signal) for automatically canceling operations when the actor stops.
120120

121121
## Using `ActionContext` Externally
122122

@@ -126,18 +126,10 @@ Rivet provides the `ActionContextOf` utility type for exactly this purpose:
126126

127127
<CodeSnippet file="examples/docs/actors-actions/action-context.ts" />
128128

129-
See [types](/docs/actors/types) for more details on using `ActionContextOf` and other utility types.
129+
See [types](/actors/docs/types) for more details on using `ActionContextOf` and other utility types.
130130

131131
## Debugging
132132

133133
- `GET /inspector/rpcs` lists all available actions on an actor.
134134
- `POST /inspector/action/:name` executes an action with JSON args and returns output.
135135
- In non-dev mode, inspector endpoints require authorization.
136-
137-
## API Reference
138-
139-
- [`Actions`](/typedoc/interfaces/rivetkit.mod.Actions.html) - Interface for defining actions
140-
- [`ActionContext`](/typedoc/interfaces/rivetkit.mod.ActionContext.html) - Context available in action handlers
141-
- [`ActorDefinition`](/typedoc/interfaces/rivetkit.mod.ActorDefinition.html) - Interface for defining actors with actions
142-
- [`ActorHandle`](/typedoc/types/rivetkit.client_mod.ActorHandle.html) - Handle for calling actions from client
143-
- [`ActorActionFunction`](/typedoc/types/rivetkit.client_mod.ActorActionFunction.html) - Type for action functions
File renamed without changes.

0 commit comments

Comments
 (0)