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
1 change: 0 additions & 1 deletion HIDDEN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ Pages that render a TODO callout. These are live and indexed.
| `/actors/docs/http-api` | rivet repo |
| `/agentos/docs/software` | agentos repo |
| `/dynamic-apps/docs`, `/docs/concepts`, `/docs/quickstart` | dynamic-apps repo — whole vertical unwritten |
| `/workflows/docs`, `/docs/concepts`, `/docs/quickstart` | workflows repo — whole vertical unwritten |

## Content parked, not published

Expand Down
2 changes: 1 addition & 1 deletion src/data/agentSetupPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const AGENT_SETUP_PROMPTS = {
packageName: '@rivet-dev/workflows',
quickstartUrl: 'https://rivet.dev/workflows/docs/quickstart/',
docsUrl: 'https://rivet.dev/workflows/docs/',
issuesUrl: 'https://github.com/rivet-dev/actors/issues',
issuesUrl: 'https://github.com/rivet-dev/workflows/issues',
}),
'dynamic-apps': buildAgentSetupPrompt({
product: 'Dynamic Apps',
Expand Down
4 changes: 2 additions & 2 deletions src/data/faqs/workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const workflowsFaqs: FaqItem[] = [
{
question: "What is a Rivet Workflow?",
answerHtml:
'An <a href="https://rivet.dev/actors/docs/">Actor</a> run handler wrapped in workflow(). Each ctx.step() records its result, so a run resumes after restarts and deployments.',
'An <a href="https://rivet.dev/actors/docs/">Actor</a> defined with workflow() from @rivet-dev/workflows. Each ctx.step() records its result, so a run resumes after restarts and deployments.',
},
{
question: "Does Workflows guarantee exactly-once execution?",
Expand All @@ -32,6 +32,6 @@ export const workflowsFaqs: FaqItem[] = [
{
question: "Is Rivet Workflows open source?",
answerHtml:
'Yes, Apache 2.0. Read the <a href="https://github.com/rivet-dev/rivet/tree/main/rivetkit-typescript/packages/rivetkit/src/workflow">implementation on GitHub</a>.',
'Yes, Apache 2.0. Read the <a href="https://github.com/rivet-dev/workflows">implementation on GitHub</a>.',
},
];
104 changes: 0 additions & 104 deletions src/data/use-cases.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/actors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const compositionLayers = [
{
name: 'Workflows',
logo: productLogos.workflows.src,
body: 'Adds recorded steps, retries, and replay for work that outlives a process. Every workflow is an Actor run handler.',
body: 'Adds recorded steps, retries, and replay for work that outlives a process. Every workflow is an Actor.',
href: '/workflows/',
},
{
Expand Down
9 changes: 4 additions & 5 deletions src/pages/agentos.astro
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,16 @@ await bob.prompt({
{ key: 'workflows', fileName: 'workflow.ts', code: `// server.ts
import { agentOS, setup } from "@rivet-dev/agentos";
import pi from "@agentos-software/pi";
import { actor, queue } from "rivetkit";
import { workflow } from "rivetkit/workflow";
import { queue, workflow } from "@rivet-dev/workflows";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 Medium · The combined agentOS workflow example does not type-check

@rivet-dev/agentos currently depends on exactly rivetkit@2.3.10, while @rivet-dev/workflows requires the peer range >=2.3.11 <2.4.0. That gives this example two RivetKit copies: workflow() returns the 2.3.11 ActorDefinition, but agentOS's setup() accepts the 2.3.10 class. Because ActorDefinition contains a private #config field, those classes are nominally incompatible, so the later setup({ use: { vm, codeReview } }) fails type checking.

Align the agentOS and Workflows packages on one compatible RivetKit version before publishing this cross-product example, and type-check the complete snippet against those package versions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, and it's a packaging issue in @rivet-dev/agentos, not in this snippet.

What I checked:

  • @rivet-dev/agentos pins rivetkit to exactly 2.3.10 in latest (0.2.19), rc (0.2.20-rc.1), and main (0.0.0-main.5ac5a14). @rivet-dev/workflows@1.0.0 needs rivetkit >=2.3.11 <2.4.0.
  • In a clean install of agentos 0.2.19, @agentos-software/pi 0.2.7, and workflows 1.0.0, npm installs two copies (rivetkit 2.3.10 and 2.3.17). Running tsc --noEmit on the server.ts part fails with TS2344: Property '#private' in type 'Registry' refers to a different member on step.client<typeof registry>().
  • With an npm override that forces one rivetkit@2.3.17, the same snippet type-checks with no errors. So the code is right once there's only one RivetKit copy.

Why I didn't swap in setup from @rivet-dev/workflows: that variant does type-check, but it skips what agentOS's own setup configures (experimentalActorUds: true, which the VM sidecar uses for SQLite, plus larger message size limits). It would also still load two RivetKit runtimes. It would pass tsc and then break the VM at runtime.

I left the snippet as the intended API. The fix is to widen @rivet-dev/agentos's rivetkit dependency to include >=2.3.11 (or make it a peer dependency), which is being handled separately in rivet-dev/agentos.


const vm = agentOS({ software: [pi] });

const codeReview = actor({
const codeReview = workflow({
state: { status: "pending" },
queues: {
review: queue<{ approved: boolean; feedback?: string }>(),
},
run: workflow(async (ctx) => {
run: async (ctx) => {
let feedback = "";

for (let revision = 1; revision <= 3; revision++) {
Expand Down Expand Up @@ -164,7 +163,7 @@ const codeReview = actor({
}

throw new Error("Review rejected after 3 revisions");
}),
},
});

export const registry = setup({ use: { vm, codeReview } });
Expand Down
17 changes: 8 additions & 9 deletions src/pages/workflows.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ import {
SITE_SECTION_CLASS,
} from '@/components/marketing/layout';

const WORKFLOW_SOURCE_ROOT =
'https://github.com/rivet-dev/rivet/tree/main/rivetkit-typescript/packages/rivetkit/src/workflow';
const ACTOR_EXAMPLE_ROOT =
'https://github.com/rivet-dev/rivet/blob/main/examples/docs/actors-workflows';
const WORKFLOW_SOURCE_ROOT = 'https://github.com/rivet-dev/workflows';
const WORKFLOW_EXAMPLE_ROOT =
'https://github.com/rivet-dev/workflows/blob/main/examples/docs/actors-workflows';
const BUG_FIXER_SOURCE_URL_ROOT =
'https://github.com/rivet-dev/agentos/blob/main/examples/workflows';
const INSPECTOR_IMAGE =
'https://assets.rivet.dev/website/marketing/screenshots/rivet-workflows-inspector.png';

const actorsRoot = requireDocsRoot('actors');
const workflowsRoot = requireDocsRoot('workflows');
const workflowsProduct = getProduct('workflows');

if (!workflowsProduct) {
Expand Down Expand Up @@ -86,14 +85,14 @@ const progressTabs = await Promise.all([
sourceTab({
key: 'invoice',
label: 'invoice.ts',
root: actorsRoot,
root: workflowsRoot,
file: 'examples/docs/actors-workflows/simple-workflow/index.ts',
documentationUrl: '/workflows/docs/quickstart',
sourceUrl: `${ACTOR_EXAMPLE_ROOT}/simple-workflow/index.ts`,
sourceUrl: `${WORKFLOW_EXAMPLE_ROOT}/simple-workflow/index.ts`,
}),
]);

// What every run gets from the Actor it lives in. These double as the
// What every run gets from being an Actor. These double as the
// differentiators against cluster-based durable execution, stated positively.
const actorInheritance = [
{
Expand Down Expand Up @@ -129,7 +128,7 @@ const compositionLayers = [
{
name: 'Actors',
logo: productLogos.actors.src,
body: 'Every workflow is an Actor run handler. Actors provide identity, state, queues, and scheduling.',
body: 'Every workflow is an Actor. Actors provide identity, state, queues, and scheduling.',
href: '/actors/',
},
{
Expand Down
Loading