upstash-workflow-js

โดย upstash

ทักษะสำหรับ Upstash Workflow TypeScript/JavaScript SDK เพื่อกำหนด เรียกใช้ และจัดการเวิร์กโฟลว์ ใช้ทักษะนี้เมื่อผู้ใช้ต้องการสร้างเวิร์กโฟลว์…

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.

Skills เพิ่มเติมจาก upstash

context7-cli
upstash
ใช้ CLI ctx7 เพื่อดึงเอกสารไลบรารี จัดการทักษะการเขียนโค้ด AI และกำหนดค่า Context7 MCP เปิดใช้งานเมื่อผู้ใช้พูดถึง "ctx7" หรือ "context7"…
official
context7-mcp
upstash
ทักษะนี้ควรใช้เมื่อผู้ใช้สอบถามเกี่ยวกับไลบรารี เฟรมเวิร์ก เอกสารอ้างอิง API หรือต้องการตัวอย่างโค้ด เปิดใช้งานสำหรับคำถามเกี่ยวกับการตั้งค่า โค้ด…
official
documentation-lookup
upstash
ทักษะนี้ควรใช้เมื่อผู้ใช้ถามเกี่ยวกับไลบรารี เฟรมเวิร์ก เอกสารอ้างอิง API หรือต้องการตัวอย่างโค้ด เปิดใช้งานสำหรับคำถามเกี่ยวกับการตั้งค่า โค้ด...
official
find-docs
upstash
ดึงเอกสารและตัวอย่างโค้ดล่าสุดสำหรับไลบรารีใดๆ โดยใช้ Context7 CLI
official
context7-cli
upstash
ใช้ CLI ctx7 เพื่อดึงเอกสารไลบรารี จัดการทักษะการเขียนโค้ด AI และกำหนดค่า Context7 MCP เปิดใช้งานเมื่อผู้ใช้พูดถึง "ctx7" หรือ "context7"...
official
context7-docs-lookup
upstash
ใช้ Context7 เพื่อดึงเอกสารไลบรารีที่ทันสมัย ทำงานเมื่อผู้ใช้ถามเกี่ยวกับไลบรารี เฟรมเวิร์ก เอกสารอ้างอิง API หรือต้องการตัวอย่างโค้ด —…
official
context7-mcp
upstash
ทักษะนี้ควรใช้เมื่อผู้ใช้ถามเกี่ยวกับไลบรารี เฟรมเวิร์ก เอกสารอ้างอิง API หรือต้องการตัวอย่างโค้ด เปิดใช้งานสำหรับคำถามเกี่ยวกับการตั้งค่า โค้ด…
official
ctx7-cli
upstash
ใช้ CLI ctx7 เพื่อดึงเอกสารไลบรารี จัดการทักษะการเขียนโค้ด AI และกำหนดค่า Context7 MCP เปิดใช้งานเมื่อผู้ใช้พูดถึง "ctx7" หรือ "context7"...
official