upstash-workflow-js

bởi upstash

Kỹ năng cho SDK Upstash Workflow TypeScript/JavaScript để định nghĩa, kích hoạt và quản lý quy trình làm việc. Sử dụng Kỹ năng này bất cứ khi nào người dùng muốn tạo quy trình làm việc…

npx skills add https://github.com/upstash/skills --skill upstash-workflow-js

Upstash Workflow SDK

Quick Start

The Upstash Workflow SDK lets you expose serverless workflow endpoints and run them reliably using QStash under the hood.

Install:

npm install @upstash/workflow

Define a simple workflow endpoint:

import { serve } from "@upstash/workflow";

export const { POST } = serve(async (context) => {
  await context.run("step-1", () => console.log("step 1"));
  await context.run("step-2", () => console.log("step 2"));
});

Trigger it from your backend:

import { Client } from "@upstash/workflow";

const client = new Client({ token: process.env.QSTASH_TOKEN! });
await client.trigger({ url: "https://your-app.com/api/workflow" });

Other Skill Files

These files contain the full documentation. Use them for details, patterns, and advanced behavior.

  • basics:
    • basics/serve – How to expose workflow endpoints.
    • basics/context – Full API for workflow context (steps, waits, webhooks, events, invoke, etc.).
    • basics/client – Using the Workflow client to trigger, cancel, inspect, and notify runs.
  • features:
    • features/invoke – Cross‑workflow invocation.
    • features/reliability – Retries, failure callbacks, and DLQ.
    • features/flow-control – Rate limits, concurrency, and parallelism.
    • features/wait-for-event – Notify and wait-for-event patterns.
    • features/webhooks – Webhook creation and consumption.
  • how to:
    • how-to/local-dev – Local QStash dev server (auto via QSTASH_DEV=true) and tunneling.
    • how-to/realtime – Realtime and human‑in‑the‑loop workflows.
    • how-to/migrations – Migrating workflows safely.
    • how-to/middleware – Adding middleware to workflows.
  • other files:
    • rest-api – Low-level REST endpoints for interacting with QStash/Workflow.
    • troubleshooting – Common debugging and environment issues.
    • agents – Using Workflow with agents, orchestrators, and automation patterns.

Thêm skills từ upstash

context7-docs
upstash
Fetch up-to-date documentation and code examples for any library, framework, SDK, CLI tool, or cloud service. Use whenever the user asks about a specific…
official
context7-mcp
upstash
Kỹ năng này nên được sử dụng khi người dùng hỏi về thư viện, framework, tài liệu tham khảo API hoặc cần ví dụ mã. Kích hoạt cho các câu hỏi thiết lập, mã…
official
ctx7-cli
upstash
Sử dụng CLI ctx7 để tải tài liệu thư viện, quản lý kỹ năng lập trình AI và cấu hình Context7 MCP. Kích hoạt khi người dùng đề cập đến "ctx7" hoặc "context7",…
official
docs
upstash
Truy xuất và truy vấn tài liệu cập nhật cùng ví dụ mã nguồn từ Context7 cho bất kỳ thư viện hoặc framework lập trình nào. Sử dụng khi viết mã phụ thuộc vào…
official
documentation-lookup
upstash
Tìm nạp tài liệu thư viện hiện tại và ví dụ mã thay vì dựa vào dữ liệu huấn luyện. Phân giải tên thư viện thành ID tài liệu Context7, sau đó truy vấn thông tin thiết lập, cấu hình và tham chiếu API. Hỗ trợ các framework và thư viện chính: React, Vue, Svelte, Next.js, Express, Prisma, Supabase, Tailwind và các framework khác. Tự động kích hoạt cho các câu hỏi thiết lập, yêu cầu tạo mã và truy vấn cụ thể về framework. Trả về tài liệu nhận biết phiên bản và mã chính thức...
official
find-docs
upstash
Truy xuất tài liệu hiện tại và ví dụ mã cho bất kỳ thư viện nào bằng CLI Context7.
official
redis-js
upstash
Làm việc với SDK Upstash Redis JavaScript/TypeScript cho các thao tác Redis không máy chủ. Sử dụng để lưu cache, lưu trữ phiên, giới hạn tốc độ, bảng xếp hạng, tìm kiếm toàn văn…
official
upstash-search-js
upstash
Điểm vào cho các kỹ năng tài liệu bao gồm hướng dẫn nhanh Upstash Search, các khái niệm cốt lõi và cách sử dụng SDK TypeScript. Sử dụng khi người dùng hỏi cách bắt đầu,…
official