inngest-realtime
БесплатноБез исполняемых скриптовНе проверенUse when streaming durable workflow updates to a UI in real time — live order status pages that animate as steps complete, AI agent token streaming from a…
от Asymmetric-al★ 354 звезды на GitHubОб этом скилле
Inngest Realtime
Stream updates from durable Inngest functions to live UIs. Use channels and topics to broadcast progress, render workflow execution as it happens, or build bi-directional human-in-the-loop flows.
These skills are focused on TypeScript. For Python or Go, refer to the Inngest documentation for language-specific guidance. Core concepts apply across all languages.
⚠ CRITICAL: v3 vs v4 package selection
Realtime in Inngest v4 lives at the SDK subpath
inngest/realtime. The standalone@inngest/realtimenpm package is a v3-era package and is NOT compatible with[email protected]. If your project is on v4 (the npm default), do not install@inngest/realtime. Use the imports below.Symptoms of using the wrong package on v4:
TypeError: Cls is not a constructoron everyPUT /api/inngest, 401 on subscription tokens, type incompatibility onnew Inngest({ middleware: [...] }). Verify yourpackage.jsonshows"inngest": "^4.x"before reading further.
Prerequisites
- Inngest v4 SDK installed (
npm install inngest) — see theinngest-setupskill INNGEST_DEV=1set in.env.localfor local development (without it, the SDK demands cloud signing keys and 401s on token requests)- Local Inngest dev server running (
npx inngest-cli@latest dev) - Optional:
zodfor schema validation on topics
When to use Realtime
| Problem shape | Pattern |
|---|---|
| Order status page animates as durable workflow steps complete | Per-run channel, publish per step, client subscribes |
| AI agent streams tokens to a chat UI | Per-conversation channel, publish chunks, stream to browser |
| Log tail for a long-running job | Single channel, log topic, append to UI |
| Human-in-the-loop approval | Channel + waitForEvent, publish prompt, wait for response |
| Admin dashboard with live order list | Global admin channel, fan-out from each function |
Architecture
Three pieces:
- Channel definition — a typed contract for what gets published. Lives in shared module so both server and client can reference the same channel name.
- Publishing — call
step.realtime.publishbetween steps to wrap a durable publish, orinngest.realtime.publishinsidestep.runbecause you're already inside a memoized step. See "Which publish method to use" below. - Subscribing — server action mints a subscription token; React client uses the
useRealtimehook (or the lower-levelsubscribe()API for non-React consumers).
Step 1: Define a channel
Channels are pure data — no class hierarchy, no zod runtime required (but recommended for type safety). Define them once and import where needed.
// src/inngest/channels.ts
import { channel } from "inngest/realtime";
import { z } from "zod";
// Per-run channel: each fulfill-order run publishes step updates to its own channel.
export const orderChannel = channel({
name: (orderId: string) => `order:${orderId}`,
topics: {
step: {
schema: z.object({
name: z.string(),
status: z.enum(["running", "complete", "failed"]),
output: z.record(z.string(), z.unknown()).optional(),
ts: z.number(),
}),
},
},
});
// Global admin channel: fan-out for cross-cutting visibility.
export const adminChannel = channel({
name: "admin",
topics: {
order: {
schema: z.object({
orderId: z.string(),
step: z.string(),
status: z.enum(["running", "complete", "failed"]),
ts: z.number(),
}),
},
},
});
Two channel name shapes:
name: 'admin'— static channel, accessed asadminChannel.order(topic ref)name: (id) => 'channel:${id}'— parametric, accessed asorderChannel(id).step(call the channel def with the id, then access topic)
Step 2: Publish from inside a function
Inngest v4 ships realtime support natively — no middleware required. But where you call publish matters: it determines whether the publish is durable, and it's the most common place to get realtime wrong.
Which publish method to use
| Where you are | Use this | Why |
|---|
Установить inngest-realtime в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл inngest-realtime?
Use when streaming durable workflow updates to a UI in real time — live order status pages that animate as steps complete, AI agent token streaming from a function to the browser, log tailing for long-running jobs, or human-in-the-loop approval flows that publish a prompt and wait for a user reply. Covers Inngest v4 native realtime: defining typed channels, publishing from inside step.run, minting subscription tokens via server actions, and consuming the stream from React/Next.js client components.
Как установить скилл inngest-realtime?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл inngest-realtime запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic