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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/bright-discovery-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workflow/web": patch
---

Disable Vite minification so the published build contains readable code, reducing false-positive obfuscation flags from supply chain security scanners (Socket).
5 changes: 5 additions & 0 deletions .changeset/clean-lights-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@workflow/world-vercel": patch
---

Use custom stream close control frame to decide whether to reconnect to stream
106 changes: 71 additions & 35 deletions docs/app/[lang]/(home)/components/frameworks.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use client";
'use client';

import { track } from "@vercel/analytics";
import Link from "next/link";
import type { ComponentProps } from "react";
import { toast } from "sonner";
import { track } from '@vercel/analytics';
import Link from 'next/link';
import type { ComponentProps } from 'react';
import { toast } from 'sonner';

export const Express = (props: ComponentProps<"svg">) => (
export const Express = (props: ComponentProps<'svg'>) => (
<svg
width="999"
height="223"
Expand All @@ -22,7 +22,7 @@ export const Express = (props: ComponentProps<"svg">) => (
</svg>
);

export const Fastify = (props: ComponentProps<"svg">) => (
export const Fastify = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 1000 1000"
fill="none"
Expand All @@ -37,7 +37,7 @@ export const Fastify = (props: ComponentProps<"svg">) => (
</svg>
);

export const AstroDark = (props: ComponentProps<"svg">) => (
export const AstroDark = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 85 107"
fill="none"
Expand Down Expand Up @@ -78,7 +78,7 @@ export const AstroDark = (props: ComponentProps<"svg">) => (
</svg>
);

export const AstroLight = (props: ComponentProps<"svg">) => (
export const AstroLight = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 85 107"
fill="none"
Expand All @@ -104,7 +104,7 @@ export const AstroLight = (props: ComponentProps<"svg">) => (
</svg>
);

export const AstroGray = (props: ComponentProps<"svg">) => (
export const AstroGray = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 85 107"
fill="none"
Expand All @@ -130,7 +130,7 @@ export const AstroGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const TanStack = (props: ComponentProps<"svg">) => (
export const TanStack = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 410 413"
fill="none"
Expand All @@ -152,7 +152,7 @@ export const TanStack = (props: ComponentProps<"svg">) => (
</svg>
);

export const TanStackGray = (props: ComponentProps<"svg">) => (
export const TanStackGray = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 409 413"
fill="none"
Expand All @@ -167,7 +167,7 @@ export const TanStackGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const Vite = (props: ComponentProps<"svg">) => (
export const Vite = (props: ComponentProps<'svg'>) => (
<svg
width="410"
height="404"
Expand Down Expand Up @@ -213,7 +213,7 @@ export const Vite = (props: ComponentProps<"svg">) => (
</svg>
);

export const Nitro = (props: ComponentProps<"svg">) => (
export const Nitro = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
Expand All @@ -230,7 +230,7 @@ export const Nitro = (props: ComponentProps<"svg">) => (
/>
<mask
id="mask0_115_108"
style={{ maskType: "alpha" }}
style={{ maskType: 'alpha' }}
maskUnits="userSpaceOnUse"
x="0"
y="0"
Expand Down Expand Up @@ -302,7 +302,7 @@ export const Nitro = (props: ComponentProps<"svg">) => (
</svg>
);

export const SvelteKit = (props: ComponentProps<"svg">) => (
export const SvelteKit = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
Expand All @@ -325,7 +325,7 @@ export const SvelteKit = (props: ComponentProps<"svg">) => (
</svg>
);

export const SvelteKitGray = (props: ComponentProps<"svg">) => (
export const SvelteKitGray = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
xmlnsXlink="http://www.w3.org/1999/xlink"
Expand All @@ -348,7 +348,7 @@ export const SvelteKitGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const Nuxt = (props: ComponentProps<"svg">) => (
export const Nuxt = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 424 283"
fill="none"
Expand All @@ -363,7 +363,7 @@ export const Nuxt = (props: ComponentProps<"svg">) => (
</svg>
);

export const NuxtGray = (props: ComponentProps<"svg">) => (
export const NuxtGray = (props: ComponentProps<'svg'>) => (
<svg
viewBox="0 0 424 283"
fill="none"
Expand All @@ -378,7 +378,7 @@ export const NuxtGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const Hono = (props: ComponentProps<"svg">) => (
export const Hono = (props: ComponentProps<'svg'>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 98" {...props}>
<title>Hono</title>
<path
Expand All @@ -395,7 +395,7 @@ export const Hono = (props: ComponentProps<"svg">) => (
</svg>
);

export const HonoGray = (props: ComponentProps<"svg">) => (
export const HonoGray = (props: ComponentProps<'svg'>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 76 98" {...props}>
<title>Hono</title>
<path
Expand All @@ -415,7 +415,7 @@ export const HonoGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const Bun = (props: ComponentProps<"svg">) => (
export const Bun = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
id="Bun"
Expand Down Expand Up @@ -449,7 +449,7 @@ export const Bun = (props: ComponentProps<"svg">) => (
id="Top"
d="M35.12,5.53A16.41,16.41,0,0,1,29.49,18c-.28.25-.06.73.3.59,3.37-1.31,7.92-5.23,6-13.14C35.71,5,35.12,5.12,35.12,5.53Zm2.27,0A16.24,16.24,0,0,1,39,19c-.12.35.31.65.55.36C41.74,16.56,43.65,11,37.93,5,37.64,4.74,37.19,5.14,37.39,5.49Zm2.76-.17A16.42,16.42,0,0,1,47,17.12a.33.33,0,0,0,.65.11c.92-3.49.4-9.44-7.17-12.53C40.08,4.54,39.82,5.08,40.15,5.32ZM21.69,15.76a16.94,16.94,0,0,0,10.47-9c.18-.36.75-.22.66.18-1.73,8-7.52,9.67-11.12,9.45C21.32,16.4,21.33,15.87,21.69,15.76Z"
fill="#ccbea7"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
/>
<path
id="Outline"
Expand Down Expand Up @@ -504,19 +504,19 @@ export const Bun = (props: ComponentProps<"svg">) => (
<path
id="Eyes"
d="M25.7,38.8a5.51,5.51,0,1,0-5.5-5.51A5.51,5.51,0,0,0,25.7,38.8Zm24.77,0A5.51,5.51,0,1,0,45,33.29,5.5,5.5,0,0,0,50.47,38.8Z"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
/>
<path
id="Iris"
d="M24,33.64a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,24,33.64Zm24.77,0a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,48.75,33.64Z"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
fill="#fff"
/>
</g>
</svg>
);

export const BunGray = (props: ComponentProps<"svg">) => (
export const BunGray = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
id="Bun"
Expand Down Expand Up @@ -553,7 +553,7 @@ export const BunGray = (props: ComponentProps<"svg">) => (
id="Top"
d="M35.12,5.53A16.41,16.41,0,0,1,29.49,18c-.28.25-.06.73.3.59,3.37-1.31,7.92-5.23,6-13.14C35.71,5,35.12,5.12,35.12,5.53Zm2.27,0A16.24,16.24,0,0,1,39,19c-.12.35.31.65.55.36C41.74,16.56,43.65,11,37.93,5,37.64,4.74,37.19,5.14,37.39,5.49Zm2.76-.17A16.42,16.42,0,0,1,47,17.12a.33.33,0,0,0,.65.11c.92-3.49.4-9.44-7.17-12.53C40.08,4.54,39.82,5.08,40.15,5.32ZM21.69,15.76a16.94,16.94,0,0,0,10.47-9c.18-.36.75-.22.66.18-1.73,8-7.52,9.67-11.12,9.45C21.32,16.4,21.33,15.87,21.69,15.76Z"
fill="var(--color-background)"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
/>
<path
id="Outline"
Expand Down Expand Up @@ -615,20 +615,20 @@ export const BunGray = (props: ComponentProps<"svg">) => (
<path
id="Eyes"
d="M25.7,38.8a5.51,5.51,0,1,0-5.5-5.51A5.51,5.51,0,0,0,25.7,38.8Zm24.77,0A5.51,5.51,0,1,0,45,33.29,5.5,5.5,0,0,0,50.47,38.8Z"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
fill="var(--color-muted-foreground)"
/>
<path
id="Iris"
d="M24,33.64a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,24,33.64Zm24.77,0a2.07,2.07,0,1,0-2.06-2.07A2.07,2.07,0,0,0,48.75,33.64Z"
style={{ fillRule: "evenodd" }}
style={{ fillRule: 'evenodd' }}
fill="var(--color-background)"
/>
</g>
</svg>
);

export const Nest = (props: ComponentProps<"svg">) => (
export const Nest = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
id="NestJS"
Expand All @@ -644,7 +644,7 @@ export const Nest = (props: ComponentProps<"svg">) => (
</svg>
);

export const NestGray = (props: ComponentProps<"svg">) => (
export const NestGray = (props: ComponentProps<'svg'>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
id="NestJS"
Expand All @@ -660,7 +660,43 @@ export const NestGray = (props: ComponentProps<"svg">) => (
</svg>
);

export const Next = (props: ComponentProps<"svg">) => (
export const Python = (props: ComponentProps<'svg'>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 255" {...props}>
<title>Python</title>
<defs>
<linearGradient
id="pythonLogoA"
x1="12.959%"
x2="79.639%"
y1="12.039%"
y2="78.201%"
>
<stop offset="0%" stopColor="#387EB8" />
<stop offset="100%" stopColor="#366994" />
</linearGradient>
<linearGradient
id="pythonLogoB"
x1="19.128%"
x2="90.742%"
y1="20.579%"
y2="88.429%"
>
<stop offset="0%" stopColor="#FFE052" />
<stop offset="100%" stopColor="#FFC331" />
</linearGradient>
</defs>
<path
fill="url(#pythonLogoA)"
d="M126.916.072c-64.832 0-60.784 28.115-60.784 28.115l.072 29.128h61.868v8.745H41.631S.145 61.355.145 126.77c0 65.417 36.21 63.097 36.21 63.097h21.61v-30.356s-1.165-36.21 35.632-36.21h61.362s34.475.557 34.475-33.319V33.97S194.67.072 126.916.072zM92.802 19.66a11.12 11.12 0 0 1 11.13 11.13 11.12 11.12 0 0 1-11.13 11.13 11.12 11.12 0 0 1-11.13-11.13 11.12 11.12 0 0 1 11.13-11.13z"
/>
<path
fill="url(#pythonLogoB)"
d="M128.757 254.126c64.832 0 60.784-28.115 60.784-28.115l-.072-29.127H127.6v-8.745h86.441s41.486 4.705 41.486-60.712c0-65.416-36.21-63.096-36.21-63.096h-21.61v30.355s1.165 36.21-35.632 36.21h-61.362s-34.475-.557-34.475 33.32v56.013s-5.235 33.897 62.518 33.897zm34.114-19.586a11.12 11.12 0 0 1-11.13-11.13 11.12 11.12 0 0 1 11.13-11.131 11.12 11.12 0 0 1 11.13 11.13 11.12 11.12 0 0 1-11.13 11.13z"
/>
</svg>
);

export const Next = (props: ComponentProps<'svg'>) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" {...props}>
<title>Next.js</title>
<circle cx="64" cy="64" r="62" strokeWidth="4" className="stroke-border" />
Expand Down Expand Up @@ -700,10 +736,10 @@ export const Next = (props: ComponentProps<"svg">) => (

export const Frameworks = () => {
const handleRequest = () => {
track("Framework requested", { framework: "tanstack" });
toast.success("Request received", {
track('Framework requested', { framework: 'tanstack' });
toast.success('Request received', {
description:
"Thanks for expressing interest in TanStack. We will be adding support for it soon.",
'Thanks for expressing interest in TanStack. We will be adding support for it soon.',
});
};

Expand Down
42 changes: 32 additions & 10 deletions docs/components/geistdocs/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,19 @@ import {
SheetHeader,
SheetTitle,
} from '@/components/ui/sheet';
import { Badge } from '@/components/ui/badge';
import { useSidebarContext } from '@/hooks/geistdocs/use-sidebar';
import { SearchButton } from './search';

// Map of URL suffixes to badges shown inline next to the sidebar item name.
const SIDEBAR_ITEM_BADGES: Array<{ suffix: string; label: string }> = [
{ suffix: '/docs/getting-started/python', label: 'Beta' },
];

function getSidebarBadge(url: string): string | undefined {
return SIDEBAR_ITEM_BADGES.find((b) => url.endsWith(b.suffix))?.label;
}

export const Sidebar = () => {
const { root } = useTreeContext();
const { isOpen, setIsOpen } = useSidebarContext();
Expand Down Expand Up @@ -109,16 +119,28 @@ export const Folder: SidebarPageTreeComponents['Folder'] = ({
);
};

export const Item: SidebarPageTreeComponents['Item'] = ({ item }) => (
<SidebarItem
className="block w-full truncate text-pretty py-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground data-[active=true]:text-foreground"
external={item.external}
href={item.url}
icon={item.icon}
>
{item.name}
</SidebarItem>
);
export const Item: SidebarPageTreeComponents['Item'] = ({ item }) => {
const badgeLabel = getSidebarBadge(item.url);

return (
<SidebarItem
className="flex w-full items-center gap-2 text-pretty py-1.5 text-muted-foreground text-sm transition-colors hover:text-foreground data-[active=true]:text-foreground"
external={item.external}
href={item.url}
icon={item.icon}
>
<span className="truncate">{item.name}</span>
{badgeLabel ? (
<Badge
variant="secondary"
className="shrink-0 px-1.5 py-0 text-[10px] leading-4"
>
{badgeLabel}
</Badge>
) : null}
</SidebarItem>
);
};

export const Separator: SidebarPageTreeComponents['Separator'] = ({ item }) => (
<SidebarSeparator className="mt-4 mb-2 flex items-center gap-2 px-0 font-medium text-sm first-child:mt-0">
Expand Down
4 changes: 0 additions & 4 deletions docs/content/docs/api-reference/workflow-ai/durable-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ related:
- /docs/ai/defining-tools
---

<Callout type="warn">
The `@workflow/ai` package is currently in active development and should be considered experimental.
</Callout>

The `DurableAgent` class enables you to create AI-powered agents that can maintain state across workflow steps, call tools, and gracefully handle interruptions and resumptions.

Tool calls can be implemented as workflow steps for automatic retries, or as regular workflow-level logic utilizing core library features such as [`sleep()`](/docs/api-reference/workflow/sleep) and [Hooks](/docs/foundations/hooks).
Expand Down
5 changes: 0 additions & 5 deletions docs/content/docs/api-reference/workflow-ai/index.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
---
title: "@workflow/ai"
icon: FlaskConical
description: Helpers for building AI-powered workflows with the AI SDK.
type: overview
summary: Explore helpers for integrating AI SDK to build durable AI-powered workflows.
related:
- /docs/ai
---

<Callout type="warn">
The `@workflow/ai` package is currently in active development and should be considered experimental.
</Callout>

Helpers for integrating AI SDK for building AI-powered workflows.

## Classes
Expand Down
Loading
Loading